-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/eeprom struct #56
Conversation
This is some major cleanup! Good work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great to see this PR!
I've only done a very quick first pass check in this review (I am running off to uni in a few mins, so low on time)
needs some more careful review. Main Q is if we try to make this strictly a structure change for this PR, then follow-up separately with logic changes
Src/signal.c
Outdated
@@ -14,6 +14,7 @@ | |||
#include "sounds.h" | |||
#include "targets.h" | |||
|
|||
EEprom_t eepromBuffer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this in signal.c? would main.c make more sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question
Src/sounds.c
Outdated
@@ -322,18 +322,18 @@ void playBeaconTune3() | |||
// fwdgt_counter_reload(); | |||
// signaltimeout = 0; | |||
|
|||
// if(eepromBuffer[i] == 255){ | |||
// if(eepromBuffer.buffer[i] == 255){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as i has changed, this commented out code is now incorrect. Maybe remove the commented code? or fix it to use the tune[] array?
@@ -2,8 +2,8 @@ | |||
; *** Scatter-Loading Description File generated by uVision *** | |||
; ************************************************************* | |||
|
|||
LR_IROM1 0x08001000 0x0000FFFF { ; load region size_region | |||
ER_IROM1 0x08001000 0x0000FFFF { ; load address = execution address | |||
LR_IROM1 0x08001000 0x00007BDF { ; load region size_region |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason why this is changing? does this impact the keil build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its just "more correct" because thats the hard limit for the region
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a separate PR?
Src/main.c
Outdated
if (eepromBuffer.eeprom_version > 2) { | ||
if (eepromBuffer.auto_advance > 1) { | ||
eepromBuffer.auto_advance = 0; | ||
save_flash_nolib(eepromBuffer.buffer, sizeof(eepromBuffer.buffer), eeprom_address); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why re-save here? each save is a risk. If we lose power during a save the user can end up with incorrect settings.
needs a rebase |
7238301
to
701f7f6
Compare
# Conflicts: # Src/main.c
701f7f6
to
e159476
Compare
removed the uint8_t array and replaced with a struct
removed buffer variables, and refactored with direct eeprom struct access