mirror of
https://github.com/OpenSolo/OpenSolo.git
synced 2025-04-29 22:24:32 +02:00
UI: Updated text strings on display
- Changed "3DR Solo App" to more generic "Mobile App" - More useful waring text strings - CH7 high & low notification strings
This commit is contained in:
parent
655b878263
commit
958f6a0f2b
@ -474,6 +474,10 @@ void Ui::processAlert(Event::ID id)
|
||||
case Event::RecordRequiresApp:
|
||||
case Event::ControllerValueOutOfRange:
|
||||
case Event::CamControlValueOutOfRange:
|
||||
case Event::CH7low:
|
||||
case Event::CH7high:
|
||||
case Event::CH8low:
|
||||
case Event::CH8high:
|
||||
if (BIT(currentState) & (BIT(FullscreenAlert) | BIT(Arming) | BIT(Gimbal) | BIT(Telem))) {
|
||||
initFullscreenAlert(id);
|
||||
}
|
||||
@ -688,13 +692,13 @@ void Ui::drawLockout()
|
||||
//x = Gfx::write(x, y, "preflight ", HelveticaNeueLTProLightGreen);
|
||||
uint16_t color_fg = UiColor::Green;
|
||||
uint16_t color_bg = UiColor::Black;
|
||||
x = Gfx::write(x, y, "preflight ", HelveticaNeueLTProLightLargeWhiteOnBlack, &color_fg, &color_bg);
|
||||
x = Gfx::write(x, y, "Open ", HelveticaNeueLTProLightLargeWhiteOnBlack, &color_fg, &color_bg);
|
||||
|
||||
Gfx::write(x, y, "update", HelveticaNeueLTProLightLarge);
|
||||
Gfx::write(x, y, "Solo", HelveticaNeueLTProLightLarge);
|
||||
|
||||
const Gfx::FontAsset & f = HelveticaNeueLTProRoman;
|
||||
Gfx::writeCanvasCenterJustified(168, "Required before first flight!", f);
|
||||
Gfx::writeCanvasCenterJustified(168 + f.height() + 2, "Use 3DR Solo App to update", f);
|
||||
Gfx::writeCanvasCenterJustified(168, "Solo & Controller Version Mismatch!", f);
|
||||
Gfx::writeCanvasCenterJustified(168 + f.height() + 2, "Install Latest Updates", f);
|
||||
}
|
||||
|
||||
Ui::State Ui::determineState()
|
||||
|
@ -12,13 +12,13 @@ const UiAlertManager::Alert UiAlertManager::alerts[] = {
|
||||
{ Red, NoHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Calibrating ", "altitude", "Please wait", NULL },
|
||||
|
||||
// CompassCalRequired
|
||||
{ Red, HighHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Compass ", "error", "Please calibrate compass using\nthe 3DR Solo app", NULL },
|
||||
{ Red, HighHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Compass ", "error", "Please calibrate compass using\nmobile app and reboot solo", NULL },
|
||||
|
||||
// CompassInterference
|
||||
{ Red, NoHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Magnetic ", "interference", "Move Solo away from metal objects", NULL },
|
||||
|
||||
// LevelError
|
||||
{ Red, MedHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Level ", "error", "Please calibrate level using\nthe 3DR Solo app", NULL },
|
||||
{ Red, MedHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Level ", "error", "Please calibrate level using\nmobile app and reboot solo", NULL },
|
||||
|
||||
// CalibrationFailed
|
||||
{ Red, MedHaptic, FullScreenModal, NO_TIMEOUT, DismissA, "Motion ", "detected", "Take off from a steady surface", NULL },
|
||||
@ -29,7 +29,7 @@ const UiAlertManager::Alert UiAlertManager::alerts[] = {
|
||||
/// Pre-flight - Arm
|
||||
|
||||
// CantArmWhileLeaning
|
||||
{ Orange, NoHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Uneven ", "surface", "Solo must be level for takeoff\nMove Solo to a flat surface", NULL },
|
||||
{ Orange, NoHaptic, FullScreenModal, 5000, DismissNone, "Uneven ", "surface", "Solo must be level for takeoff\nMove Solo to a flat surface", NULL },
|
||||
|
||||
// VehicleCalibrating
|
||||
{ Orange, NoHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Calibrating ", "Solo", "Please wait", NULL },
|
||||
@ -41,10 +41,10 @@ const UiAlertManager::Alert UiAlertManager::alerts[] = {
|
||||
{ Orange, NoHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Calibrating ", "level", "Follow app instructions", NULL },
|
||||
|
||||
// CompassCalRecovery
|
||||
{ Green, NoHaptic, FullScreenModal, NO_TIMEOUT, DismissA, "Calibrated ", "compass", NULL, "Press A to dismiss" },
|
||||
{ Green, NoHaptic, FullScreenModal, NO_TIMEOUT, DismissA, "Calibrated ", "compass", NULL, "Press A to dismiss\nthen reboot solo" },
|
||||
|
||||
// ThrottleError
|
||||
{ Orange, LowHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Lower ", "throttle", "This flight mode requires low\nthrottle before starting motors", NULL },
|
||||
{ Orange, LowHaptic, FullScreenModal, 5000, DismissNone, "Lower ", "throttle", "This flight mode requires low\nthrottle before starting motors", NULL },
|
||||
|
||||
// VehicleRequiresService // TODO: duplicate of CalibrationFailed, should just change logic in code
|
||||
{ Red, HighHaptic, FullScreenModal, NO_TIMEOUT, DismissNone, "Calibration ", "error", "Please restart Solo", NULL },
|
||||
@ -68,10 +68,10 @@ const UiAlertManager::Alert UiAlertManager::alerts[] = {
|
||||
{ Green, NoHaptic, FullScreenModal, 7000, DismissNone, "Controller ", "inactive", "Powering off", NULL },
|
||||
|
||||
// SoloAppConnected
|
||||
{ Green, NoHaptic, HintBoxBanner, 5000, DismissNone, NULL, NULL, "3DR Solo app connected", NULL },
|
||||
{ Green, NoHaptic, HintBoxBanner, 5000, DismissNone, NULL, NULL, "Mobile app connected", NULL },
|
||||
|
||||
// SoloAppDisconnected
|
||||
{ Orange, NoHaptic, HintBoxBanner, 5000, DismissNone, NULL, NULL, "3DR Solo app disconnected", NULL },
|
||||
{ Orange, NoHaptic, HintBoxBanner, 5000, DismissNone, NULL, NULL, "Mobile app disconnected", NULL },
|
||||
|
||||
// ControllerValueOutOfRange
|
||||
{ Red, NoHaptic, FullScreenThenHintBox, 5000, DismissNone, "Control stick ", "error", "Contact 3DR Support", NULL },
|
||||
@ -124,7 +124,7 @@ const UiAlertManager::Alert UiAlertManager::alerts[] = {
|
||||
{ Red, LowHaptic, FullScreenModal, 5000, DismissNone, "Maximum ", "altitude", "Solo has reached preset\nmaximum altitude", NULL },
|
||||
|
||||
// CrashDetected
|
||||
{ Red, HighHaptic, FullScreenModal, NO_TIMEOUT, DismissA, "Crash ", "detected", "Use 3DR Solo app to\nlog a support ticket", "Press A to dismiss" },
|
||||
{ Red, HighHaptic, FullScreenModal, NO_TIMEOUT, DismissA, "Crash ", "detected", "Hopefully nothing too\nexpensive broke", "Press A to dismiss" },
|
||||
|
||||
// LandingComplete
|
||||
{ Green, NoHaptic, HintBoxBanner, 5000, DismissNone, NULL, NULL, NULL, NULL },
|
||||
@ -166,7 +166,11 @@ const UiAlertManager::Alert UiAlertManager::alerts[] = {
|
||||
// ChargerConnected
|
||||
{ White, NoHaptic, FullScreenModal, 3000, DismissNone, NULL, NULL, NULL, NULL },
|
||||
|
||||
|
||||
// CH-7 & CH-8 RC control
|
||||
{ Green, LowHaptic, HintBoxBanner, 3000, DismissNone, NULL, NULL, "CH-7 Set Low", NULL },
|
||||
{ Green, LowHapticMed, HintBoxBanner, 3000, DismissNone, NULL, NULL, "CH-7 Set High", NULL },
|
||||
{ Green, LowHaptic, HintBoxBanner, 3000, DismissNone, NULL, NULL, "CH-8 Set Low", NULL },
|
||||
{ Green, LowHapticMed, HintBoxBanner, 3000, DismissNone, NULL, NULL, "CH-8 Set High", NULL },
|
||||
|
||||
/// Testing
|
||||
|
||||
@ -271,6 +275,12 @@ void UiAlertManager::Alert::startHaptic() const
|
||||
case MedHaptic:
|
||||
Haptic::startPattern(Haptic::LightTriple);
|
||||
break;
|
||||
case LowHaptic:
|
||||
Haptic::startPattern(Haptic::SingleShort);
|
||||
break;
|
||||
case LowHapticMed:
|
||||
Haptic::startPattern(Haptic::SingleMedium);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
LowHaptic,
|
||||
MedHaptic,
|
||||
HighHaptic,
|
||||
LowHapticMed,
|
||||
};
|
||||
|
||||
enum DismissBtn {
|
||||
|
@ -20,16 +20,16 @@ const UiBottomBox::Msg UiBottomBox::msgs[] = {
|
||||
|
||||
|
||||
/// Pre-flight - Artoo
|
||||
{ Event::SoloAppConnected, NoUserInput, 5000, "3DR Solo app connected", NULL },
|
||||
{ Event::SoloAppConnected, NoUserInput, 5000, "Mobile app connected", NULL },
|
||||
|
||||
{ Event::SoloAppDisconnected, NoUserInput, 5000, "3DR Solo app disconnected", NULL },
|
||||
{ Event::SoloAppDisconnected, NoUserInput, 5000, "Mobile app disconnected", NULL },
|
||||
|
||||
// Persistent alerts
|
||||
{ Event::ControllerValueOutOfRange, NoUserInput, 5000, "Control stick error", "Contact 3DR Support"},
|
||||
{ Event::CamControlValueOutOfRange, NoUserInput, 5000, "Manual camera controls error", "Contact 3DR Support"},
|
||||
|
||||
// Unused
|
||||
{ Event::RecordRequiresApp, NoUserInput, 5000, "3DR Solo app required for this action", NULL },
|
||||
{ Event::RecordRequiresApp, NoUserInput, 5000, "Mobile app required for this action", NULL },
|
||||
|
||||
{ Event::UnknownBattery, NoUserInput, 5000, "Unknown controller battery", "Displayed level may not be accurate" },
|
||||
|
||||
@ -71,6 +71,12 @@ const UiBottomBox::Msg UiBottomBox::msgs[] = {
|
||||
|
||||
/// Misc
|
||||
{ Event::LandingComplete, NoUserInput, 5000, "Landing complete", NULL },
|
||||
|
||||
// RC Channels
|
||||
{ Event::CH7low, NoUserInput, 5000, "CH-7 Off/Low", NULL },
|
||||
{ Event::CH7high, NoUserInput, 5000, "CH-7 On/High", NULL },
|
||||
{ Event::CH8low, NoUserInput, 5000, "CH-8 Off/Low", NULL },
|
||||
{ Event::CH8high, NoUserInput, 5000, "CH-8 On/High", NULL },
|
||||
|
||||
/// Testing
|
||||
{ Event::TestAlert, NoUserInput, 5000, "RTL not available without GPS", "(Test test)" },
|
||||
|
@ -82,6 +82,10 @@ enum ID {
|
||||
ControllerBatteryFailsafe,
|
||||
ControllerBatteryFailsafeNoGps,
|
||||
ChargerConnected,
|
||||
CH7low,
|
||||
CH7high,
|
||||
CH8low,
|
||||
CH8high,
|
||||
TestAlert,
|
||||
AlertEnd,
|
||||
};
|
||||
|
@ -95,7 +95,7 @@ void UiTelemetry::updatePrimaryRegion()
|
||||
unsigned alt = MIN(999, roundf(a));
|
||||
|
||||
const Gfx::ImageAsset & unit = useMetricUnits ? Unit_UD_Meter : Unit_UD_Feet;
|
||||
labeledNumericField(alt, 190, 129, 3, "000", unit, altFont);
|
||||
labeledNumericField(alt, 190, 136, 3, "000", unit, altFont);
|
||||
|
||||
altitudeDirty = false;
|
||||
}
|
||||
@ -258,7 +258,7 @@ void UiTelemetry::updateKillSwitchProgress()
|
||||
void UiTelemetry::drawStaticElements()
|
||||
{
|
||||
Gfx::drawImage(190, 54, Label_UD_Home);
|
||||
Gfx::drawImage(190, 114, Label_UD_Alt);
|
||||
Gfx::drawImage(190, 120, Label_UD_Alt);
|
||||
}
|
||||
|
||||
bool UiTelemetry::autoLandActive() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user