fork/GramFirmware

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

Jonathan HaylettAdd option for enabling crouch walk option select33cb1e4

codespace-scaling-space-guide-56rpxqvxpg2v57v
651 B27 linesraw
1#ifndef _MODES_MELEE20BUTTON_HPP
2#define _MODES_MELEE20BUTTON_HPP
3
4#include "core/ControllerMode.hpp"
5#include "core/socd.hpp"
6#include "core/state.hpp"
7
8typedef struct {
9    bool crouch_walk_os = false;
10} Melee20ButtonOptions;
11
12class Melee20Button : public ControllerMode {
13  public:
14    Melee20Button(socd::SocdType socd_type, Melee20ButtonOptions options = {});
15
16  protected:
17    void UpdateDigitalOutputs(InputState &inputs, OutputState &outputs);
18    void UpdateAnalogOutputs(InputState &inputs, OutputState &outputs);
19
20  private:
21    Melee20ButtonOptions _options;
22    bool _horizontal_socd;
23
24    void HandleSocd(InputState &inputs);
25};
26
27#endif