When Ground Control connects with the Firmware, it requests the Firmware to report all the machine parameter values. When this happens, sometimes the Firmware has a different value than what is in Ground Control. When that happens, Ground Control needs to decide which value to use, and then set that value in both Ground Control and the Firmware, to ensure consistency. Right now, that functionality does not work.
My questions are:
When there is a difference between the Firmware value and the Ground Control value, which value should be kept?
Why?
Are there any situations in which we would want a different answer? e.g. we prefer the Firmware value in one context, and the Ground Control value in the other.
Based on the input from @dlang, the solution is to create something to query the user for which is preferred: the value from Firmware, or the value from GC.
Shouldnât the values match in the first place? Is the âscenarioâ that you ran the âHoley Calibration .pyâ, edited your GC.ini and fire up GC where Eprom meets .ini?
Or is it also like?: You changed settings in GC that are written to the .ini and (for some reason) not stored in the Mega.
The questions to ask would be:
did you edit the .ini
did you change settings in GC the last time you ran it
For both the answer would be to overwrite the Eprom with the .ini, just guessing here.
but if you managed to loose your .ini and GC created a new one with defaults,
you donât want to overwrite the correct firmware data with the bad .ini data.
If you have access to more than one maslow, you want to use the firmware data,
not the .ini data
in both of these cases, you want to overwrite the .ini data with the firmware
data.
in the two cases you give, you want to overwrite the firmware data with the .ini
data.
thatâs why I say there is no one right answer, when they conflict, the user
should be asked which to use (possibly listing the possible causes and saying
which is the correct answer for that cause)
This topic isnât dealing with âmy system brokeâ but the more general âwhat is
the right thing to do when there is a conflictâ to define the action going going
forward.
I was doing work to run calibrations, so I had made modifications to parameters in GC, via the GC GUI in the Holey Calibration process. Also, I was making modifications to the Firmware and re-programming the Arduino. I was not doing anything out of the ordinary, like modifying text files outside of GC. I am honestly not sure what specifically caused the two do be misaligned. Re-programming the Arduino is a red-flag. Another possible cause is a GC crash; if something goes wrong that causes GC to crash, it might not correctly update the *.ini file.
What I do know is there were differences in the parameter values, and GC did not correct them. Instead, GC kept its values and the Firmware kept its values. It is very misleading.
Does someone already have a list of parameters (guess that covers all values) on what are in the Eprom and what in the .ini and what are in both? (it would take me ages to put that together)
I can see the workaround, a solution it seems not. What kind of users are you asking needs to be considered.
The only case i can think of that the user changes a value in the Mega is that he has a command in a macro or in a.nc file and how many users that do that are we counting.
Happy to be not silenced and thankful for reminders going off-topic.
This is the code which manages how GC responds to these conflicts. I think the root-cause of why the conflict happened is more difficult to quarantine.
This kind of thing is in the code. For example, when GC connects to the Firmware, GC sends a â$$â command, which causes the Firmware to loop through a list of parameters, and report them back. That list of parameters has to be defined somewhere in the code.
Hmm something seems wrong here, your .ini and rom are out of whack!
Do you want to use default settings? Y/N
not default settings, they may be highly customized.
Do you want to use your Computer .ini settings, your Rom settings, Default settings or eXit and fix the problem yourself? C/R/D/X
Y write a default file, wipe eeprom, sync
N - leave the eeprom " please replace or repair your .ini file, you will remain out of sync"
if you use the ROM settings, you should update the .ini file with the data from
the ROM, not leave it broken (unless you want to add an âIgnore and continueâ
option)