Skip to content

Commit 16f3942

Browse files
jbinzstojadin2701
authored andcommitted
[GS] Implemented Bearing and Downrange in live screen.
1 parent a28dd3e commit 16f3942

File tree

5 files changed

+250
-43
lines changed

5 files changed

+250
-43
lines changed

ground_station/src/hmi/bmp.hpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@ const unsigned char live_altitude[] PROGMEM = {
5757
0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00,
5858
0x00, 0x30, 0x00, 0x01, 0xfe, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
5959

60+
// 'down_range', 24x24px
61+
const unsigned char down_range[] PROGMEM = {
62+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x1f, 0xe0,
63+
0x00, 0x1f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0x6e, 0x00, 0x00, 0xc0, 0x00, 0x01, 0x80, 0x00, 0x01, 0x80, 0x00,
64+
0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x0f, 0xc0, 0x00,
65+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
66+
67+
const unsigned char compass[] PROGMEM = {
68+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x03, 0xff, 0x80, 0x0e, 0x00, 0xe0,
69+
0x1c, 0x00, 0x70, 0x18, 0x03, 0x30, 0x38, 0x0f, 0x38, 0x30, 0x1e, 0x18, 0x30, 0x3e, 0x18, 0x30, 0x6c, 0x18,
70+
0x30, 0x6c, 0x18, 0x30, 0xf8, 0x18, 0x30, 0xf0, 0x18, 0x39, 0xe0, 0x38, 0x19, 0x80, 0x30, 0x0e, 0x00, 0xe0,
71+
0x07, 0x83, 0xc0, 0x03, 0xff, 0x80, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
72+
73+
const unsigned char right_arrow[] PROGMEM = {
74+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
75+
0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x38, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x3f, 0x00,
76+
0x00, 0x3f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x30, 0x00,
77+
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
78+
79+
const unsigned char left_arrow[] PROGMEM = {
80+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
81+
0x00, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x7c, 0x00, 0x00, 0xfc, 0x00,
82+
0x01, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0c, 0x00,
83+
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
84+
6085
// 'battery', 24x24px
6186
const unsigned char live_battery[] PROGMEM = {
6287
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x22, 0x00, 0x00, 0xff, 0x80,

ground_station/src/hmi/hmi.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void Hmi::live() {
132132
if (link1Log) {
133133
recorder.record(&link1.data.getRxData(), 1);
134134
}
135-
window.updateLive(&link1.data, &link1.info, 0);
135+
window.updateLive(&link1.data, &navigation, &link1.info, 0);
136136
updated = true;
137137
} else if (link1.info.isUpdated()) {
138138
window.updateLive(&link1.info, 0);
@@ -145,7 +145,7 @@ void Hmi::live() {
145145
if (link2Log) {
146146
recorder.record(&link2.data.getRxData(), 2);
147147
}
148-
window.updateLive(&link2.data, &link2.info, 1);
148+
window.updateLive(&link2.data, &navigation, &link2.info, 1);
149149
updated = true;
150150
} else if (link2.info.isUpdated()) {
151151
window.updateLive(&link2.info, 1);
@@ -158,6 +158,14 @@ void Hmi::live() {
158158
window.refresh();
159159
}
160160

161+
if (rightButton.wasPressed()) {
162+
window.UpdateLiveState(&link1.data, &link2.data, &navigation, Window::LiveState::kShowDownRange);
163+
}
164+
165+
if (leftButton.wasPressed()) {
166+
window.UpdateLiveState(&link1.data, &link2.data, &navigation, Window::LiveState::kShowGnss);
167+
}
168+
161169
if (backButton.wasPressed()) {
162170
state = MENU;
163171
isLogging = false;

0 commit comments

Comments
 (0)