Skip to content

Commit

Permalink
ArduPlane: Support for OLED display by Alexey Kozin
Browse files Browse the repository at this point in the history
  • Loading branch information
dipspb committed Nov 22, 2016
1 parent 6c22674 commit 81180ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ArduPlane/GCS_Mavlink.cpp
Expand Up @@ -2181,6 +2181,7 @@ void Plane::gcs_update(void)
void Plane::gcs_send_text(MAV_SEVERITY severity, const char *str)
{
GCS_MAVLINK::send_statustext(severity, 0xFF, str);
notify.send_text(str);
}

/*
Expand All @@ -2196,6 +2197,7 @@ void Plane::gcs_send_text_fmt(MAV_SEVERITY severity, const char *fmt, ...)
hal.util->vsnprintf((char *)str, sizeof(str), fmt, arg_list);
va_end(arg_list);
GCS_MAVLINK::send_statustext(severity, 0xFF, str);
notify.send_text(str);
}

/*
Expand Down
3 changes: 3 additions & 0 deletions ArduPlane/sensors.cpp
Expand Up @@ -129,6 +129,9 @@ void Plane::read_battery(void)
battery.exhausted(g.fs_batt_voltage, g.fs_batt_mah)) {
low_battery_event();
}
if (battery.get_type() != AP_BattMonitor::BattMonitor_TYPE_NONE) {
AP_Notify::flags.battery_voltage = battery.voltage(); //for on-board oled display
}

if (should_log(MASK_LOG_CURRENT)) {
Log_Write_Current();
Expand Down
1 change: 1 addition & 0 deletions ArduPlane/system.cpp
Expand Up @@ -322,6 +322,7 @@ void Plane::set_mode(enum FlightMode mode, mode_reason_t reason)
// don't switch modes if we are already in the correct mode.
return;
}
AP_Notify::flags.flight_mode = mode; //for on-board oled display
if(g.auto_trim > 0 && control_mode == MANUAL)
trim_control_surfaces();

Expand Down

0 comments on commit 81180ca

Please sign in to comment.