Newer
Older
Michael Carpenter
committed
#ifndef BATTERYMONITORCONFIG_H
#define BATTERYMONITORCONFIG_H
#include <QWidget>
#include "AP2ConfigWidget.h"
Michael Carpenter
committed
#include "ui_BatteryMonitorConfig.h"
class BatteryMonitorConfig : public AP2ConfigWidget
Michael Carpenter
committed
{
Q_OBJECT
public:
explicit BatteryMonitorConfig(QWidget *parent = 0);
~BatteryMonitorConfig();
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();
void alertOnLowClicked(bool checked);
Michael Carpenter
committed
void activeUASSet(UASInterface *uas);
void batteryChanged(UASInterface* uas, double voltage, double current, double percent, int seconds);
Michael Carpenter
committed
private:
Ui::BatteryMonitorConfig ui;
inline float calculatemVPerAmp(float maxvoltsout,float maxamps);
inline float calculatemVPerVolt(float maxvoltsout,float maxvolts);
Michael Carpenter
committed
};
#endif // BATTERYMONITORCONFIG_H