fork/GramFirmware

git clone https://git.julia.blue/fork/GramFirmware

Jonathan Haylettrefactor: Use struct for PM mode optionsffa4b72

v0.1.1
641 B26 linesraw
1#ifndef _MODES_PROJECTM_HPP
2#define _MODES_PROJECTM_HPP
3
4#include "core/ControllerMode.hpp"
5#include "core/socd.hpp"
6#include "core/state.hpp"
7
8typedef struct {
9    bool true_z_press = false;
10    bool ledgedash_max_jump_traj = true;
11} ProjectMOptions;
12
13class ProjectM : public ControllerMode {
14  public:
15    ProjectM(socd::SocdType socd_type, ProjectMOptions options = {});
16
17  private:
18    ProjectMOptions _options;
19    bool _horizontal_socd;
20
21    void HandleSocd(InputState &inputs);
22    void UpdateDigitalOutputs(InputState &inputs, OutputState &outputs);
23    void UpdateAnalogOutputs(InputState &inputs, OutputState &outputs);
24};
25
26#endif