Skip to content

Commit

Permalink
Fix EEPROM saving issue when issuing a RESET command via a serial ter…
Browse files Browse the repository at this point in the history
…minal.
  • Loading branch information
Ken committed Oct 30, 2019
1 parent 5e69da1 commit 22d4535
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -12,6 +12,9 @@ long voltMeterConstant = VM_CONST_DEFAULT;
uint8_t pP_i2c_address = 0xa0;

void resetEEPROM() {

resetConfig();

EEPROM.put(GAIN_FACTOR_ADDRESS, GAIN_FACTOR);
EEPROM.put(FOLLOWER_THRESHOLD_ADDRESS, followerThrs);
EEPROM.put(COMP_THRESHOLD_ADDRESS, compThrs);
Expand Down
3 changes: 2 additions & 1 deletion firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_config.h
Expand Up @@ -61,6 +61,7 @@
#endif

void resetEEPROM();
void resetConfig();
void restoreConfig();

#endif
#endif

0 comments on commit 22d4535

Please sign in to comment.