Skip to content

Commit

Permalink
Microhard stuff and Wifi-card string
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Aug 18, 2024
1 parent 59ab36b commit 36ce398
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
7 changes: 7 additions & 0 deletions app/telemetry/models/aohdsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ void AOHDSystem::process_onboard_computer_status(const mavlink_onboard_computer_
set_curr_v3d_freq_mhz(msg.storage_usage[0]);
set_curr_space_left_mb(msg.storage_usage[1]);
set_rpi_undervolt_error(msg.link_tx_rate[0]==1);
set_microhard_enabled(msg.link_rx_rate[0]);
set_microhard_rssi(msg.link_rx_rate[1]);
set_microhard_tx_pwr(msg.link_rx_rate[2]);
set_microhard_bw(msg.link_rx_rate[3]);
set_microhard_freq(msg.link_rx_rate[4]);
set_microhard_noise(msg.link_rx_rate[5]);
set_microhard_snr(msg.link_rx_rate[6]);
set_ina219_voltage_millivolt(msg.storage_usage[2]);
set_ina219_current_milliamps(msg.storage_usage[3]);
set_ram_usage_perc(msg.ram_usage);
Expand Down
8 changes: 8 additions & 0 deletions app/telemetry/models/aohdsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ class AOHDSystem : public QObject
L_RO_PROP(QString,curr_telemetry_rx_pps,set_curr_telemetry_rx_pps,"-1pps")
L_RO_PROP(QString,curr_telemetry_tx_bps,set_curr_telemetry_tx_bps,"-1bps")
L_RO_PROP(QString,curr_telemetry_rx_bps,set_curr_telemetry_rx_bps,"-1bps")
// microhard specific
L_RO_PROP(int,microhard_enabled,set_microhard_enabled,0)
L_RO_PROP(int,microhard_rssi,set_microhard_rssi,0)
L_RO_PROP(int,microhard_tx_pwr,set_microhard_tx_pwr,0)
L_RO_PROP(int,microhard_bw,set_microhard_bw,0)
L_RO_PROP(int,microhard_freq,set_microhard_freq,0)
L_RO_PROP(int,microhard_noise,set_microhard_noise,0)
L_RO_PROP(int,microhard_snr,set_microhard_snr,0)
//
// The following stats only exist on the air instance, since they are only generated by OpenHD air unit
// for the UI, if his value is set we show a warning below the bitrate icon to the user
Expand Down
22 changes: 14 additions & 8 deletions app/telemetry/models/wificard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,28 @@ static std::string wifi_card_type_to_string(const int card_type) {
case 1:
return "RTL88X2BU";
case 2:
return "ERR_RTL_88X2AU";
return "RTL88X2CU";
case 3:
return "ERR_RTL_88X2BU";
return "RTL88X2EU";
case 4:
return "ATHEROS";
return "ERR_RTL_88X2AU";
case 5:
return "MT_7921u";
return "ERR_RTL_88X2AU";
case 6:
return "RALINK";
return "ERR_RTL_88X2BU";
case 7:
return "INTEL";
return "ATHEROS";
case 8:
return "BROADCOM";
return "MT_7921u";
case 9:
return "8852BU";
return "RALINK";
case 10:
return "INTEL";
case 11:
return "BROADCOM";
case 12:
return "8852BU";
case 13:
return "EMULATED";
default:
return "UNKNOWN";
Expand Down

0 comments on commit 36ce398

Please sign in to comment.