BatteryMonitorConfig.h 1.03 KB
Newer Older
1 2 3 4
#ifndef BATTERYMONITORCONFIG_H
#define BATTERYMONITORCONFIG_H

#include <QWidget>
5
#include "AP2ConfigWidget.h"
6 7
#include "ui_BatteryMonitorConfig.h"

8
class BatteryMonitorConfig : public AP2ConfigWidget
9 10 11 12 13 14
{
    Q_OBJECT
    
public:
    explicit BatteryMonitorConfig(QWidget *parent = 0);
    ~BatteryMonitorConfig();
15 16 17 18 19 20 21 22
private slots:
    void parameterChanged(int uas, int component, QString parameterName, QVariant value);
    void monitorCurrentIndexChanged(int index);
    void sensorCurrentIndexChanged(int index);
    void apmVerCurrentIndexChanged(int index);
    void calcDividerSet();
    void ampsPerVoltSet();
    void batteryCapacitySet();
23
    void alertOnLowClicked(bool checked);
24 25
    void activeUASSet(UASInterface *uas);
    void batteryChanged(UASInterface* uas, double voltage, double current, double percent, int seconds);
26 27
private:
    Ui::BatteryMonitorConfig ui;
28 29
    inline float calculatemVPerAmp(float maxvoltsout,float maxamps);
    inline float calculatemVPerVolt(float maxvoltsout,float maxvolts);
30 31 32
};

#endif // BATTERYMONITORCONFIG_H