pathfinder-for-autonomous-navigation / FlightSoftware

Flight software, test software, ground software, and mission control.
http://pan-software.readthedocs.io
MIT License
9 stars 6 forks source link

Downlink Shift id1 and id2 fields not being applied in uplinks #863

Open shihaocao opened 2 years ago

shihaocao commented 2 years ago

Using the same test harnessing in #862, it is observed that specifically, this uplink below does not cause the downlink.shift_id1 and downlink.shift_id2 fields are not being updated, or at least do not change from 0 by the time DownlinkParser is being executed.

[
    {
    "field": "radio.max_wait",
    "value": 10420
    },
    {
    "field": "radio.max_transceive",
    "value": 10
    },
    {
    "field": "adcs_cmd.havt_disable18",
    "value": true
    },
    {
    "field": "adcs.state",
    "value": 1
    },
    {
    "field": "gomspace.piksi_off",
    "value": true
    },
    {
    "field": "gomspace.power_cycle_output4_cmd",
    "value": true
    },
    {
    "field": "downlink.shift_id1",
    "value": 19
    },
    {
    "field": "downlink.shift_id2",
    "value": 2
    }
]
shihaocao commented 2 years ago

Sample debug output from bugfix/uplink:

[2022-02-09 22:54:15.181655] (ERROR) UplinkConsumer::execute()

[2022-02-09 22:54:15.181655] (ERROR) Null or length 0

[2022-02-09 22:54:15.235655] (ERROR) DP pre execute
[2022-02-09 22:54:15.235655] (ERROR) shift_flow_ids1_f.get() = 0
[2022-02-09 22:54:15.235655] (ERROR) shift_flow_ids2_f.get() = 0
[2022-02-09 22:54:15.235655] (ERROR) DP post execute

[2022-02-09 22:54:15.327655] Successfully sent telemetry to FlightSoftware.
\x79\x11\x7c\x78\x22\x16\x88\xe6\x44\x52\x0\xc0\x11\x2d\xd\xa\x0
[2022-02-09 22:54:15.347655] (ERROR) UplinkConsumer::execute()

[2022-02-09 22:54:15.347655] (ERROR) Validating

[2022-02-09 22:54:15.347655] (ERROR) packet bytes in validate: 17

[2022-02-09 22:54:15.347655] (ERROR) Validate result 0

[2022-02-09 22:54:15.347655] (ERROR) packet bytes in validate: 17

[2022-02-09 22:54:15.405655] (ERROR) DP pre execute
[2022-02-09 22:54:15.405655] (ERROR) shift_flow_ids1_f.get() = 0
[2022-02-09 22:54:15.405655] (ERROR) shift_flow_ids2_f.get() = 0
[2022-02-09 22:54:15.405655] (ERROR) DP post execute
[2022-02-09 22:54:15.518655] (ERROR) UplinkConsumer::execute()

[2022-02-09 22:54:15.518655] (ERROR) Null or length 0

[2022-02-09 22:54:15.575655] (ERROR) DP pre execute
[2022-02-09 22:54:15.575655] (ERROR) shift_flow_ids1_f.get() = 0
[2022-02-09 22:54:15.575655] (ERROR) shift_flow_ids2_f.get() = 0
[2022-02-09 22:54:15.575655] (ERROR) DP post execute
[2022-02-09 22:54:15.692655] (ERROR) UplinkConsumer::execute()

As observed from above, either our uplinks do not contain the shift flow fields, or UplinkConsumer isn't Consuming them, or some other FSW is mutating them to be 0 before it gets to DownlinkParser

Duncan-McD commented 2 years ago

Seems to be fixed by removing the print statements - tested on the bugfix/uplink branch on mac with no print statements, and then tested on the 862-uplink-swap-fix branch (with the linux error code -9 fix and no print statements) and it works: image