Closed patchedByBatman closed 1 year ago
@gunturiCM ping us to review this after you test it
@gunturiCM ping us to review this after you test it
The testing is done. Please review the code. Might need peers to test as well.
Looks good @gunturiCM, I think @alphaville has covered everything. When reviewing this it made realise we have an issue with RADIO_STICK_MIN
RADIO_STICK_MAX
but I made a new issue for it (#54)
The suggested changes have been done. Please have a look.
Happy to merge
Merging into dev.
Main Changes
The
'S'
in the beginning is sent to indicate the start of the packet and is used to check for packet corruption at the ESP's end.The
"Encoded switches data"
is an integer with encoded information about the position of radio switches A (Kill switch), B (Arm switch), C (Three-way switch), and D. The last 5-bits (rightmost 5-bits) of this correspond to the switch positions as follows:radio.cpp
in #51 . This is done, but I am keeping it here for future reference.The status of addressing the posted issues in #48 is
'S'
at the beginning of every packet.'S'
, and if the received data has the above-defined format or not on the ESP's side. But we might need to add even more checks based on requirements, such as an additional check on the EPS's side to see that the received percentages are not negative and also not above a hundred.Associated Issues
Note
As of now we do not know which of these fixed issue #28, but using this code along with a proper USB cable for serial data transfer instead of the physical pins fixed it. Might want to investigate in the future for the sake of making replicas.