openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
737 B

#pragma once
#include <QObject>
class PrimeState : public QObject {
Q_OBJECT
public:
enum Type {
PRIME_TYPE_UNKNOWN = -2,
PRIME_TYPE_UNPAIRED = -1,
PRIME_TYPE_NONE = 0,
PRIME_TYPE_MAGENTA = 1,
PRIME_TYPE_LITE = 2,
PRIME_TYPE_BLUE = 3,
PRIME_TYPE_MAGENTA_NEW = 4,
PRIME_TYPE_PURPLE = 5,
};
PrimeState(QObject *parent);
void setType(PrimeState::Type type);
inline PrimeState::Type currentType() const { return prime_type; }
inline bool isSubscribed() const { return prime_type > PrimeState::PRIME_TYPE_NONE; }
signals:
void changed(PrimeState::Type prime_type);
private:
void handleReply(const QString &response, bool success);
PrimeState::Type prime_type = PrimeState::PRIME_TYPE_UNKNOWN;
};