jlecomte / ascom-oag-focuser

Open Source ASCOM-Compatible OAG Focuser For Astrophotography
MIT License
36 stars 8 forks source link

Arduino_Firmware.ino compile warning #15

Open dlkeng opened 3 months ago

dlkeng commented 3 months ago

When compiling Arduino_Firmware.ino for an Arduino Nano, the following warning occurs:

Arduino_Firmware.ino:71:42: warning: large integer implicitly truncated to unsigned type [-Woverflow]
 const unsigned int EEPROM_MAGIC_NUMBER = 0x12345678;

This appears to be due to trying to assign a 32-bit value to a 16-bit variable.

jlecomte commented 3 months ago

Ah interesting! Strangely enough, I have not run into this issue. Can you try switching int to long and see if that works? If so, please open a PR and I will merge it. Thanks!

jlecomte commented 3 months ago

Actually, fixing this requires changing a few more lines because EEPROM.get returns an int. For now, you can ignore the warning. I will fix this when I get the chance. Thanks!