From 1cc5db966654a80468bbb627e00d6a2bafb41930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Caruso?= <nicolo.caruso@skywarder.eu> Date: Thu, 17 Apr 2025 13:04:08 +0200 Subject: [PATCH] [ARP] lyra-gs-entry printing dipswitch setting --- src/Groundstation/LyraGS/lyra-gs-entry.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Groundstation/LyraGS/lyra-gs-entry.cpp b/src/Groundstation/LyraGS/lyra-gs-entry.cpp index 5cec13c85..24189763d 100644 --- a/src/Groundstation/LyraGS/lyra-gs-entry.cpp +++ b/src/Groundstation/LyraGS/lyra-gs-entry.cpp @@ -61,6 +61,17 @@ struct DipStatusLyraGS uint8_t ipConfig; }; +/** + * Dipswitch configuration + * arp mb pb mtx ptx ip3 ip2 ip1 + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | + * --------------------------------- + * | I | I | I | I | I | I | I | I | + * | O | O | O | O | O | O | O | O | + * --------------------------------- + * | H | G | F | E | D | C | B | A | + */ + DipStatusLyraGS getDipStatus(uint8_t read) { DipStatusLyraGS dipRead; @@ -131,6 +142,14 @@ int main() DipSwitch dip(sh, clk, qh, std::chrono::microseconds(microSecClk)); DipStatusLyraGS dipRead = getDipStatus(dip.read()); + std::cout << "Dipswitch state:" + << "\n\t Is ARP: " << dipRead.isARP + << "\n\t Main radio backup: " << dipRead.mainHasBackup + << "\n\t Payload radio backup: " << dipRead.payloadHasBackup + << "\n\t Main TX: " << dipRead.mainTXenable + << "\n\t Main TX: " << dipRead.payloadTXenable + << "\n\t Ip offset: " << (int)dipRead.ipConfig << "\n"; + DependencyManager manager; PrintLogger logger = Logging::getLogger("lyra_gs"); -- GitLab