Skip to content

Commit

Permalink
ConfigBatteryMonitor: Add Pixhawk 6C/Pix32 v6 (#2947)
Browse files Browse the repository at this point in the history
* Change 'Holybro Pixhawk 4 PM' to 'Holybro Power Module' , add holybro Pixhawk 6C/Pix32 v6

* update Pixhawk 6C CMB_HWVersion.SelectedIndex
  • Loading branch information
vincentpoont2 committed Sep 15, 2022
1 parent f3a9e40 commit 2c336fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions GCSViews/ConfigurationView/ConfigBatteryMonitoring.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ public void Activate()
// durandal
CMB_HWVersion.SelectedIndex = 9;
}
else if (value == 8)
{
// Pixhawk 6C/Pix32 v6
CMB_HWVersion.SelectedIndex = 10;
}
}
else
{
Expand Down Expand Up @@ -544,6 +549,12 @@ private void CMB_apmversion_SelectedIndexChanged(object sender, EventArgs e)
MainV2.comPort.setParam((byte)MainV2.comPort.sysidcurrent, (byte)MainV2.comPort.compidcurrent, "BATT_VOLT_PIN", 16);
MainV2.comPort.setParam((byte)MainV2.comPort.sysidcurrent, (byte)MainV2.comPort.compidcurrent, "BATT_CURR_PIN", 17);
}
else if (selection == 10)
{
//Pixhawk 6C/Pix32 v6
MainV2.comPort.setParam((byte)MainV2.comPort.sysidcurrent, (byte)MainV2.comPort.compidcurrent, "BATT_VOLT_PIN", 8);
MainV2.comPort.setParam((byte)MainV2.comPort.sysidcurrent, (byte)MainV2.comPort.compidcurrent, "BATT_CURR_PIN", 4);
}
}
catch
{
Expand Down
5 changes: 4 additions & 1 deletion GCSViews/ConfigurationView/ConfigBatteryMonitoring.resx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<value>8: CUAV HV PM</value>
</data>
<data name="CMB_batmonsensortype.Items9" xml:space="preserve">
<value>9: Holybro Pixhawk4 PM</value>
<value>9: Holybro Power Module</value>
</data>
<data name="CMB_batmonsensortype.Location" type="System.Drawing.Point, System.Drawing">
<value>160, 68</value>
Expand Down Expand Up @@ -684,6 +684,9 @@
<data name="CMB_HWVersion.Items9" xml:space="preserve">
<value>9: Durandal/ZealotH743</value>
</data>
<data name="CMB_HWVersion.Items10" xml:space="preserve">
<value>10: Pixhawk 6C/Pix32 v6</value>
</data>
<data name="CMB_HWVersion.Location" type="System.Drawing.Point, System.Drawing">
<value>160, 95</value>
</data>
Expand Down

0 comments on commit 2c336fe

Please sign in to comment.