Skip to content

Commit

Permalink
Merge pull request pa-pa#156 from stan23/dev-freqTest2
Browse files Browse the repository at this point in the history
Add a 5 sec delay before starting on STM32, and be more verbose when storing to EEPROM
  • Loading branch information
pa-pa authored Nov 26, 2019
2 parents eab869f + ddbb2c8 commit 242843d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/FreqTest/FreqTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,18 @@ public:
printFreq(0x210000 + freq);DPRINTLN("");

// store frequency
DPRINT("Store into config area: ");DHEX((uint8_t)(freq>>8));DHEXLN((uint8_t)(freq&0xff));
DPRINT("Store into config area: ");DHEX((uint8_t)(freq>>8));DHEX((uint8_t)(freq&0xff));
StorageConfig sc = getConfigArea();
#if defined ARDUINO_ARCH_STM32F1
Wire.begin();
DPRINT(".");
#endif
sc.clear();
DPRINT(".");
sc.setByte(CONFIG_FREQ1, freq>>8);
DPRINT(".");
sc.setByte(CONFIG_FREQ2, freq&0xff);
DPRINT(".");
sc.validate();

DPRINTLN("stored!");
Expand Down Expand Up @@ -251,6 +255,9 @@ public:
} info;

void setup () {
#if defined ARDUINO_ARCH_STM32F1
delay(5000);
#endif
DINIT(57600,ASKSIN_PLUS_PLUS_IDENTIFIER);
sdev.init(hal);
// start sender
Expand Down

0 comments on commit 242843d

Please sign in to comment.