Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ground_station/src/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void Console::printStartupMessage() {
stream.print(CONSOLE_CLEAR);
stream.print(CONSOLE_COLOR_BOLD_CYAN CONSOLE_BACKGROUND_DEFAULT);
stream.println("****************************************************");
stream.println("* CATS Groundstation *");
stream.println("* CATS Ground Station *");
stream.println("****************************************************");
stream.println(CONSOLE_LOG);
}
Expand Down
2 changes: 1 addition & 1 deletion ground_station/src/hmi/hmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ void Hmi::update(void *pvParameter) {

if (millis() - barUpdate >= 1000) {
barUpdate = millis();
const float voltage = static_cast<float>(analogRead(18)) * 0.00059154929F;
const float voltage = static_cast<float>(analogRead(18)) * 0.00062F; // 0.00059154929F;
if (!ref->isLogging) {
ref->flashFreeMemory = Utils::getFlashMemoryUsage();
}
Expand Down
35 changes: 13 additions & 22 deletions ground_station/src/hmi/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,18 @@ void Window::updateBar(float batteryVoltage, bool usb, bool logging, bool locati
display.drawBitmap(376, 1, bar_flash, 16, 16, static_cast<int16_t>(!usb));
}

// Battery
if (batteryVoltage != 0.0F && !usb) {
if (batteryVoltage > 3.3F) {
display.fillRect(373, 5, 6, 8, BLACK);
display.drawRoundRect(371, 3, 24, 12, 2, BLACK);
display.fillRect(395, 5, 3, 8, BLACK);
} else {
display.fillRect(373, 5, 6, 8, WHITE);
display.drawRoundRect(371, 3, 24, 12, 2, static_cast<int16_t>(blinkStatus));
display.fillRect(395, 5, 3, 8, static_cast<int16_t>(blinkStatus));
}
if (batteryVoltage > 3.6F) {
display.fillRect(380, 5, 6, 8, BLACK);
} else {
display.fillRect(380, 5, 6, 8, WHITE);
}
if (batteryVoltage > 3.9F) {
display.fillRect(387, 5, 6, 8, BLACK);
} else {
display.fillRect(387, 5, 6, 8, WHITE);
}
const bool veryLow = batteryVoltage <= 3.3F;
display.fillRect(373, 5, 6, 8, veryLow ? WHITE : BLACK);
display.drawRoundRect(371, 3, 24, 12, 2, veryLow ? static_cast<uint16_t>(blinkStatus) : BLACK);
display.fillRect(395, 5, 3, 8, veryLow ? static_cast<uint16_t>(blinkStatus) : BLACK);

// Bar 1: > 3.5 V
display.fillRect(373, 5, 6, 8, batteryVoltage > 3.5F ? BLACK : WHITE);
// Bar 2: > 3.7 V
display.fillRect(380, 5, 6, 8, batteryVoltage > 3.7F ? BLACK : WHITE);
// Bar 3: > 3.9 V
display.fillRect(387, 5, 6, 8, batteryVoltage > 3.9F ? BLACK : WHITE);
}

blinkStatus = !blinkStatus;
Expand Down Expand Up @@ -1017,7 +1008,7 @@ void Window::initSensorPrepareCalibrate() {
drawCentreString("Ready To Calibrate Magnetometer", 200, 90);
display.setFont(&FreeSans9pt7b);
display.setCursor(70, 130);
display.print("Rotate the Groundstation slowly");
display.print("Rotate the Ground Station slowly");
display.setCursor(49, 150);
display.print("in all directions, covering every angle.");
display.setCursor(45, 180);
Expand All @@ -1034,7 +1025,7 @@ void Window::initSensorCalibrate() {
drawCentreString("Progress: 0.00%", 200, 160);
display.setFont(&FreeSans9pt7b);
display.setCursor(82, 100);
display.print("Rotate the Groundstation until");
display.print("Rotate the Ground Station until");
display.setCursor(95, 120);
display.print("the progress shows 100%.");
display.setCursor(130, 200);
Expand Down