larus-breeze / sw_sensor

Firmware for Larus sensor MK1 and MK2
3 stars 3 forks source link

Transmit various commands from Frontend via Sensor to XCSOAR #19

Closed degeflija closed 1 week ago

degeflija commented 3 years ago

über XCI oder über geeignetes Protokoll

MaxBaex commented 3 years ago

Implement CAN Bridge to forward NMEA Strings received via CAN to a connected XCSOAR system. (e.g. via Bluetooth, USB, or UART)

degeflija commented 2 years ago

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 ?

degeflija commented 2 years ago

Commands I intend to send to XCSoar are :

MaxBaex commented 2 years ago

There are two things mixed up here:

1st shall be discussed here in this issue 2nd shall be discussed in an separate XCSOAR issue.

MaxBaex commented 2 years ago

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.

MaxBaex commented 1 year ago

dublicates #23

Simsys commented 1 month ago

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

MaxBaex commented 1 month ago
MaxBaex commented 1 month ago

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:

MaxBaex commented 1 month ago

Add the functionality to send the PLARS strings to corresponding received CAN Frames in the NMEA task.

MaxBaex commented 1 month ago

Waiting for Merge https://github.com/larus-breeze/sw_algorithms_lib/pull/34 before a pull request is created here.

MaxBaex commented 1 week ago

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.