EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.57k stars 333 forks source link

Alignment of radio and model files between Companion and firmware #3362

Open philmoz opened 1 year ago

philmoz commented 1 year ago

Is there an existing issue for this problem?

What part of EdgeTX is the focus of this bug?

Companion

Current Behavior

I was comparing the YAML files generated on my TX16S to what is saved by Companion in the .ETX file and noticed a few differences.

Any differences can mean that restoring radio and model settings to a radio from Companion might mean data is missing or changed.

Before I plow ahead and change things I wanted to be sure I'm on the right track by getting feedback from people more experienced with this stuff.

Expected Behavior

Restoring settings from Companion to a radio should result in equivalent settings be saved.

Steps To Reproduce

The differences I found so far:

RADIO.YML:

MODEL.YML - This appears to be well aligned except for the module data which has some concerns:

Version

2.8.0

Transmitter

Radiomaster TX16S / TX16SMK2

Anything else?

No response

elecpower commented 1 year ago

... and this is why I rabbit on about PRs that only apply half a change and no one goes back to align Companion. This occurred in OTX too so some of the differences are carry over eg pxx2 vs access. Then we get to this point and questions arise as to why is there misalignment. Gripe ends here.

Some data struct fields are to handle importing bin files but ETX does not care anymore. Though Companion and ETX should be mirrors except for output sequence. However both yaml parsers do not care if they have extra data thus why often lack of radio checking before writing. Missing data is what catches us out.

elecpower commented 1 year ago

Some data struct fields are to handle importing bin files but ETX does not care anymore.

For clarity these fields should be tagged as obsolete and not written.

elecpower commented 8 months ago

Companion is missing the 'manuallyEdited', 'alarmsFlash', 'imuMax' and 'imuOffset' properties. Companion writes 'gyroMax' and 'gyroOffset' for all radios; but these do not exist in the firmware.

I believe firmware 'imuMax' and 'imuOffset' equates to Companion 'gyroMax' and 'gyroOffset'. Since Companion does not use the fields then rename fields and read/write in Companion as per firmware.

Thanks @philmoz for your detective work. I'll address all of these post adc refactor due to the conflicts that would emerge.

elecpower commented 8 months ago

'alarmsFlash' is mapped to flashBeep in Companion

elecpower commented 7 months ago

Modules are a mess including trainer config and using fields from other modules eg PXX. I'll refactor to clean it up in preparation for a GUI rework I started ages ago.