32 lines
595 B
C++
32 lines
595 B
C++
#ifndef OPERATIONAL_STATE_H
|
|
#define OPERATIONAL_STATE_H
|
|
|
|
#include "state.h"
|
|
#include <stdint.h>
|
|
|
|
// Sett á 1 til að prenta CSV (time_ms,ref_rpm,actual_rpm,pwm) í Operational,
|
|
// t.d. fyrir step og load response. Einnig hægt með build_flags = -D LOG_CSV=1
|
|
#ifndef LOG_CSV
|
|
#define LOG_CSV 0
|
|
#endif
|
|
|
|
|
|
class OperationalState : public State
|
|
{
|
|
private:
|
|
uint32_t sample_count = 0;
|
|
|
|
public:
|
|
void enter() override;
|
|
|
|
void update() override;
|
|
|
|
// void command(char c) override;
|
|
|
|
void exit() override;
|
|
|
|
NodeState id() const override { return NodeState::OPERATIONAL; }
|
|
};
|
|
|
|
#endif
|