Skip to content

Commit

Permalink
Merge pull request #13 from SlyRemarks/master
Browse files Browse the repository at this point in the history
v3.2.6
  • Loading branch information
SlyRemarks authored Oct 4, 2021
2 parents 5407758 + 4372f89 commit b6be3bd
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 83 deletions.
14 changes: 10 additions & 4 deletions firmware/src/config.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

/*
* Configuration file for EmonTH_V2.ino V3.2.6
*
*/

#include <EEPROM.h>

Expand All @@ -8,7 +11,7 @@ static void load_config(){

byte flag=0;
// Read nodeID
if (EEPROM.read(0) != 255){ // 255 = EEPROM default (blank) value
if (EEPROM.read(0) != 255){ // 255 = EEPROM default (blank) value
nodeID = EEPROM.read(0);
flag++;
}
Expand Down Expand Up @@ -46,15 +49,18 @@ static void config (char c) {
nodeID = value;
break;


case 'b': // set band: 4 = 433, 8 = 868, 9 = 915
value = bandToFreq(value);
if (value)
if (value){
RF_freq = value;
}
break;

case 'g': // set network group
if (value>=0)
if (value>=0){
networkGroup = value;
}
break;

case 's': // Save to EEPROM. Atemga328p has 1kb EEPROM
Expand Down
Loading

0 comments on commit b6be3bd

Please sign in to comment.