Pārlūkot izejas kodu

changed default values (dhcp on) and reset pin to 9

master
agr pirms 4 gadiem
vecāks
revīzija
cadc7c7e1a
4 mainītis faili ar 31 papildinājumiem un 59 dzēšanām
  1. +1
    -1
      .project
  2. +1
    -1
      .settings/language.settings.xml
  3. +16
    -52
      .settings/org.eclipse.cdt.core.prefs
  4. +13
    -5
      Web_Net_Setup.ino

+ 1
- 1
.project Parādīt failu

@@ -39,7 +39,7 @@
<link>
<name>core/variant</name>
<type>2</type>
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.8.2/variants/mega</locationURI>
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/arduino/hardware/avr/1.8.2/variants/eightanaloginputs</locationURI>
</link>
<link>
<name>libraries/EEPROM</name>


+ 1
- 1
.settings/language.settings.xml Parādīt failu

@@ -4,7 +4,7 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider class="io.sloeber.core.toolchain.ArduinoLanguageProvider" console="false" env-hash="924733868962110222" id="io.sloeber.languageSettingsProvider" keep-relative-paths="false" name="Arduino Compiler Settings" parameter="${COMMAND} -E -P -v -dD -D__IN_ECLIPSE__ &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="io.sloeber.core.toolchain.ArduinoLanguageProvider" console="false" env-hash="950558152315445550" id="io.sloeber.languageSettingsProvider" keep-relative-paths="false" name="Arduino Compiler Settings" parameter="${COMMAND} -E -P -v -dD -D__IN_ECLIPSE__ &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>


+ 16
- 52
.settings/org.eclipse.cdt.core.prefs Parādīt failu

@@ -13,10 +13,10 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.EXT
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.EXTENDED_FUSES/value=0xFD
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.FILE/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.FILE/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.FILE/value=stk500v2/stk500boot_v2_mega2560.hex
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.FILE/value=atmega/ATmegaBOOT_168_atmega328.hex
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.HIGH_FUSES/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.HIGH_FUSES/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.HIGH_FUSES/value=0xD8
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.HIGH_FUSES/value=0xDA
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.LOCK_BITS/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.LOCK_BITS/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BOOTLOADER.LOCK_BITS/value=0x0F
@@ -34,7 +34,7 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.ARCH/ope
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.ARCH/value=AVR
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.BOARD/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.BOARD/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.BOARD/value=AVR_MEGA2560
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.BOARD/value=AVR_NANO
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.CORE.PATH/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.CORE.PATH/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.CORE.PATH/value=C\:\\Sloeber\\arduinoPlugin\\packages\\arduino\\hardware\\avr\\1.8.2\\cores\\arduino
@@ -49,7 +49,7 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.F_CPU/op
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.F_CPU/value=16000000L
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.MCU/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.MCU/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.MCU/value=atmega2560
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.MCU/value=atmega328p
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.PATH/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.PATH/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.PATH/value=${ProjDirPath}/${ConfigName}
@@ -67,10 +67,10 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.USB_MANU
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.USB_MANUFACTURER/value=\\"Unknown\\"
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT.PATH/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT.PATH/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT.PATH/value=C\:\\Sloeber\\arduinoPlugin\\packages\\arduino\\hardware\\avr\\1.8.2\\variants\\mega
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT.PATH/value=C\:\\Sloeber\\arduinoPlugin\\packages\\arduino\\hardware\\avr\\1.8.2\\variants\\eightanaloginputs
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT/value=mega
environment/project/io.sloeber.core.toolChain.release.613547860/A.BUILD.VARIANT/value=eightanaloginputs
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.AR.CMD/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.AR.CMD/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.AR.CMD/value=avr-gcc-ar
@@ -91,7 +91,7 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.ELF
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.ELF.EXTRA_FLAGS/value=
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.ELF.FLAGS/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.ELF.FLAGS/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.ELF.FLAGS/value=${A.COMPILER.WARNING_FLAGS} -Os -Wl,--gc-sections,--relax
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.ELF.FLAGS/value=${A.COMPILER.WARNING_FLAGS} -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.EXTRA_FLAGS/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.EXTRA_FLAGS/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.COMPILER.C.EXTRA_FLAGS/value=
@@ -160,28 +160,10 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.ESP8266.NETWOR
environment/project/io.sloeber.core.toolChain.release.613547860/A.ESP8266.NETWORK.UPLOAD.TOOL/value=esp8266OTA
environment/project/io.sloeber.core.toolChain.release.613547860/A.NAME/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.NAME/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.NAME/value=Arduino Mega or Mega 2560
environment/project/io.sloeber.core.toolChain.release.613547860/A.NAME/value=Arduino Nano
environment/project/io.sloeber.core.toolChain.release.613547860/A.PACKAGES/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PACKAGES/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PACKAGES/value=${eclipse_home}/arduinoPlugin/packages
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.0/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.0/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.0/value=0x0010
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.1/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.1/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.1/value=0x0042
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.2/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.2/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.2/value=0x0010
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.3/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.3/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.3/value=0x0042
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.4/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.4/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.4/value=0x0210
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.5/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.5/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PID.5/value=0x0242
environment/project/io.sloeber.core.toolChain.release.613547860/A.PREPROC.INCLUDES.FLAGS/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.PREPROC.INCLUDES.FLAGS/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.PREPROC.INCLUDES.FLAGS/value=-w -x c++ -M -MG -MP
@@ -424,16 +406,16 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.ALTID/o
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.ALTID/value=no_altID
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_DATA_SIZE/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_DATA_SIZE/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_DATA_SIZE/value=8192
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_DATA_SIZE/value=2048
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_SIZE/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_SIZE/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_SIZE/value=253952
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.MAXIMUM_SIZE/value=30720
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.PROTOCOL/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.PROTOCOL/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.PROTOCOL/value=wiring
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.PROTOCOL/value=arduino
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.SPEED/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.SPEED/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.SPEED/value=115200
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.SPEED/value=57600
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.TOOL/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.TOOL/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.TOOL/value=avrdude
@@ -443,24 +425,6 @@ environment/project/io.sloeber.core.toolChain.release.613547860/A.UPLOAD.USBID/v
environment/project/io.sloeber.core.toolChain.release.613547860/A.VERSION/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.VERSION/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.VERSION/value=1.8.2
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.0/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.0/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.0/value=0x2341
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.1/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.1/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.1/value=0x2341
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.2/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.2/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.2/value=0x2A03
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.3/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.3/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.3/value=0x2A03
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.4/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.4/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.4/value=0x2341
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.5/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.5/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/A.VID.5/value=0x2341
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ARCHITECTURE_ID/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ARCHITECTURE_ID/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ARCHITECTURE_ID/value=avr
@@ -469,13 +433,13 @@ environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARDS_FI
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARDS_FILE/value=C\:\\Sloeber\\arduinoPlugin\\packages\\arduino\\hardware\\avr\\1.8.2\\boards.txt
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_ID/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_ID/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_ID/value=mega
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_ID/value=nano
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_NAME/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_NAME/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_NAME/value=Arduino Mega or Mega 2560
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.BOARD_NAME/value=Arduino Nano
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.COM_PORT/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.COM_PORT/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.COM_PORT/value=COM4
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.COM_PORT/value=COM7
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ECLIPSE_LOCATION/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ECLIPSE_LOCATION/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ECLIPSE_LOCATION/value=C\:\\Sloeber\\
@@ -505,7 +469,7 @@ environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.MAKE_LOCA
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.MAKE_LOCATION/value=C\:\\Sloeber\\arduinoPlugin\\tools\\make\\
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.MENU/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.MENU/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.MENU/value=cpu\=atmega2560
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.MENU/value=cpu\=atmega328old
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.OBJCOPY/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.OBJCOPY/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.OBJCOPY/value=${A.RECIPE.OBJCOPY.EEP.PATTERN}\n\t${A.RECIPE.OBJCOPY.HEX.PATTERN}


+ 13
- 5
Web_Net_Setup.ino Parādīt failu

@@ -83,7 +83,7 @@ For more informations about EEPROMAnything.h look at http://playground.arduino.c
//#include <EEPROM.h>
//#include "EEPROMAnything.h"

#define RESET_PIN 40 //Connect a button to this PIN. If the button is hold, an the device is turned on the default ethernet settings are restored.
#define RESET_PIN 9 //Connect a button to this PIN. If the button is hold, an the device is turned on the default ethernet settings are restored.

/* structure which is stored in the eeprom.
* Look at "EEPROMAnything.h" for the functions storing and reading the struct
@@ -103,7 +103,7 @@ For more informations about EEPROMAnything.h look at http://playground.arduino.c
void set_EEPROM_Default() {
eeprom_config.config_set=1; // dont change! It's used to check if the config is already set
eeprom_config.use_dhcp=0; // use DHCP per default
eeprom_config.use_dhcp=1; // use DHCP per default
eeprom_config.dhcp_refresh_minutes=60; // refresh the DHCP every 60 minutes
// set the default MAC address. In this case its DE:AD:BE:EF:FE:ED
@@ -174,11 +174,18 @@ void read_EEPROM_Settings() {
// check if config is present or if reset button is pressed
if (eeprom_config.config_set != 1 || digitalRead(RESET_PIN) == LOW) {
// set default values
set_EEPROM_Default();
#ifdef DEBUG
Serial.println(eeprom_config.config_set);
Serial.println(digitalRead(RESET_PIN));
#endif

set_EEPROM_Default();
#ifdef DEBUG
Serial.println("write default config");
#endif
// write the config to eeprom
EEPROM_writeAnything(0, eeprom_config);
}
}
}

/**
@@ -526,6 +533,7 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t

}
}
Serial.println("write changed config");
EEPROM_writeAnything(0, eeprom_config);
}



Notiek ielāde…
Atcelt
Saglabāt