Update 'firmware/firmware.ino'

Bug fixed - the EEPROM read 16 bit value doesn't return a value before (shouldn't the compiler recognize this error!?).
This commit is contained in:
klaute 2016-10-14 21:15:43 +02:00
parent 48c40411d0
commit 461ce740a4

View file

@ -113,13 +113,11 @@ void write16BitEEPROM(uint8_t addr, uint16_t value)
void writeEEPROMConfig()
{
write32BitEEPROM( 0, start_freq);
write32BitEEPROM( 4, end_freq);
write32BitEEPROM( 8, step_freq);
write16BitEEPROM(12, intervall);
EEPROM.write(14, (uint8_t)drive_str);
}
/*****************************************************************************/
@ -138,6 +136,8 @@ uint16_t read16BitEEPROM(uint8_t addr)
{
uint16_t tmp = (uint16_t)EEPROM.read(addr ) << 8;
tmp += (uint16_t)EEPROM.read(addr + 1);
return tmp;
}
/*****************************************************************************/