Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've got a few small additions i'm using in my copy of the code which i turned into #ifdef style config options to support two hardware variants, namely a SH1106-based OLED display and the Adafruit version of the MCP4725 ADC board.
The SH1106 is compatible with the SSD1306 but when used without modifications the display will render the characters with a negative offset on the x-axis. As i bought my OLED displays from AliExpress and the sellers described them as 'the same as SSD1306' it took some troubleshooting to find out that the display itself was not at fault but needed just a different library call. This might help others running into the same problem and widens display type support.
The Adafruit MCP4725 ADC module was bugging me as well; the MCP4725 datasheet lists the default I2C address as '1100000' but customers can specify the second and third address bit to be hardwired during production which apparently Adafruit did, so their default address is '1100010' or 0x62 if pin A0 is left floating and 0x63 if pulled high (info source in comment above).
The additional disp.clear on line 1255 was necessary for me to get rid of leftover characters from the calibration screen which would sit between longitude/latitude values and the Vdd/Vcc readings. Kind of a headscratcher, this might be due to the different display type but hasn't shown any negative effect during testing so far. Uncommenting the disp.clearLine has led to flickering.
Some of the #ifdef statements had to be rewritten to include a boolean OR operand in case they're valid for both hardware variants. (source: https://stackoverflow.com/questions/2998864/how-to-add-a-or-condition-in-ifdef)
I thought the additions might be helpful for others in the future and save them some unnecessary troubleshooting but i understand that they might not be helpful with refactoring and reducing codebase size so i understand if you don't want to merge this. After all, it's just 2 small changes in 2 lines of code which can be done manually if needed.
PS: Fantastic project and very nice, clean code. Thank you for open-sourcing it! Have a happy new year!