Closed degeflija closed 1 week ago
Implement CAN Bridge to forward NMEA Strings received via CAN to a connected XCSOAR system. (e.g. via Bluetooth, USB, or UART)
I see the need to do a face-2-face brain storming on this. We possibly have three places where SW has to be adapted : AD57, Sensor, and XCSOAR. So we schould come up with a piece of paper binding things together.
For me, the foremost question is : What is the input channel into XCSoar for such commands ?
The second question is : Who takes care of the programming on XCSOAR side ?
Commands I intend to send to XCSoar are :
There are two things mixed up here:
1st shall be discussed here in this issue 2nd shall be discussed in an separate XCSOAR issue.
I see two options. My preferred one it the 1st one.
1st
The frontend implements the NMEA Strings and sends them via a CAN - Transport Protocol to the Sensor. The sensor acts as a gateway and does not manipulate the message content. From XCSOAR received NMEA strings are forwarded transparently to the frontend.
Advantages: Interpretation of NMEA strings only from the entity which displays and uses the information., The sensor software can be generic and does not need to know about the content. Would be easier to implement future extentions e.g. displaying flarm traffic as only the frontend software needs to be extended.
Disadvantag: CAN Transport protocol required as 8 bytes are not enough for NMEA strings. Hint: Tansport protocol might later anyways be needed for external firmware updates!
2nd
Frontend and Sensor implement own CAN signals. The sensor parses and creates NMEA Strings.
Disadvantages: Changes affects both the frontends and the sensors firmware.
dublicates #23
There now exists a NMEA Spezification: https://github.com/larus-breeze/doc_larus/blob/master/documentation/Larus_NMEA_Protocol.md
which is already implemented in XCSoar https://github.com/XCSoar/XCSoar/pull/1423
Receiving commands back from XCSOAR requires the ESP32 firmware https://github.com/larus-breeze/sw_sensor/blob/master/sw_esp32/ESP32_sketch_BT_WLAN/ESP32_sketch_BT_WLAN.ino to forward received frames back to the stm32 controller via both:
Add the functionality to send the PLARS strings to corresponding received CAN Frames in the NMEA task.
Waiting for Merge https://github.com/larus-breeze/sw_algorithms_lib/pull/34 before a pull request is created here.
Further commands like force to glide / force to climb force to north-up, force to course-up, force to wind-up switch on wave aid, switch off wave aid
are to be defined and discussed here first: https://github.com/larus-breeze/doc_larus/issues/8 A new implementation issue shall be opened after the definition.
über XCI oder über geeignetes Protokoll