Seahawk240 / Microsoft-FS2020-To-Arduino

A Simple Program which enables communication between a Serial Device (like an Arduino) and the Flight Simulator 2020
48 stars 7 forks source link

{Feature Request] Dataflow Improvement – Yet another Alternative #32

Closed Discman777 closed 3 years ago

Discman777 commented 3 years ago

As I have been developing a controller box for FS2020, I am learning more about how the communication protocol may be further streamlined. Granted, this may be specific to my application. I have a proposal that is different than my previous one...

Aim: To minimize the serial dataflow and wasted data traffic.

Proposal: Currently, FS2020TA maintains a static list of the sim variables, as configured by the user (GUI). In the application I have, there will be over a hundred variables overall; however, during most of its operation, it will only require visible to a dozen or so of them. If an “Activity List” can be modified in runtime—by the MCU program—serial traffic may be significantly reduced. Less serial dataflow is better, because the MCU UART protocol is slow and lacking flow control.

Protocol: At the start, the Dynamic Activity List is empty. The MCU sends a “@101/+$” to add the variable 101 to the list. A “@101/-$” removes the variable from being update. FS2020TA will update only those variables in the list, at the set frequency. As another extra feature, the update frequency too can be made programmable. E.g., sending FS2020TA “@65500/40$” (where 65500 is a reserved special ID and 40 is the frequency), will request updating to be set at 40mS interval.

With this, there is no need for FS2020TA to filter out no-change variables (in previous proposal). Reducing the added serial traffic, per update, from MCU to FS2020TA.

Thank you for your consideration. And for your excellent piece of software.

Seahawk240 commented 3 years ago

Hey there, I like the idea. Once I've arrived at the point of implementing the functions of MCU-Controlled Data-Flow I will see how to include it in a neat way. I like the idea with the reserved IDs. I surely gonna use this in the upcoming updates for new functionality! I think I have to add a options Page to my program :D But we will see! Thanks for your ideas Greetings Matthias

Discman777 commented 3 years ago

Hi Matthias,

Thanks for the reply.

BTW, after some thinking, I believe one of my earlier suggestions of “Data on Demand” is not a good idea. That is the one in which the MCU would ask for a specific variable, and FS2020TA would send the corresponding value back. Reasons: 1. Additional data traffic from the MCU to FS2020TA. 2. Data within the sim can change independently (e.g. a button is pushed), and MCU side has no way of knowing when to request data as that happens.

Please do not consider that method. Out of the suggestions regarding dataflow control, I imagine the dynamic activity list is probably more straightforward to implement.

Thanks, Joe

From: Matthias Schaaf [mailto:notifications@github.com] Sent: Friday, March 5, 2021 6:32 AM To: Seahawk240/Microsoft-FS2020-To-Arduino Microsoft-FS2020-To-Arduino@noreply.github.com Cc: Discman777 discman777@outlook.com; Author author@noreply.github.com Subject: Re: [Seahawk240/Microsoft-FS2020-To-Arduino] {Feature Request] Dataflow Improvement – Yet another Alternative (#32)

Hey there, I like the idea. Once I've arrived at the point of implementing the functions of MCU-Controlled Data-Flow I will see how to include it in a neat way. I like the idea with the reserved IDs. I surely gonna use this in the upcoming updates for new functionality! I think I have to add a options Page to my program :D But we will see! Thanks for your ideas Greetings Matthias

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Seahawk240/Microsoft-FS2020-To-Arduino/issues/32#issuecomment-791455391, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUAEIHCP4HL3CIDY3XGML3TCDTO5ANCNFSM4YSB2UMA.

Seahawk240 commented 3 years ago

Hey Joe, your probably right about the request functionality. The whole topic is a tricky subject. I strongly believe we will end up with different modes of communication. Probably something along the line of:

  1. Basic just send everything mode(like it is now)
  2. More light weight: send only data that changed for people programming simple switch boxes.
  3. MCU controlled/flow controlled way of handling data which is a more labor intensive but also more effective way of distributing data.
Seahawk240 commented 3 years ago

CLOSED -> Discussion continued in: #37