2020-09-02 17:17:58 -07:00
|
|
|
/**
|
|
|
|
* @file buttonshift.cpp
|
|
|
|
* @brief Polls pins for gear changes
|
|
|
|
*
|
|
|
|
* @date Aug 31, 2020
|
|
|
|
* @author David Holdeman, (c) 2020
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2020-10-09 20:34:45 -07:00
|
|
|
#include "gear_controller.h"
|
2020-09-02 17:17:58 -07:00
|
|
|
#include "globalaccess.h"
|
|
|
|
#include "debounce.h"
|
|
|
|
|
2022-04-23 04:34:39 -07:00
|
|
|
#if EFI_TCU
|
2020-09-02 17:17:58 -07:00
|
|
|
class ButtonShiftController: public GearControllerBase {
|
|
|
|
public:
|
2020-11-06 20:48:35 -08:00
|
|
|
ButtonShiftController();
|
2020-12-06 04:32:38 -08:00
|
|
|
|
2022-04-06 14:37:30 -07:00
|
|
|
void update() override;
|
2022-04-18 17:09:27 -07:00
|
|
|
void init() override;
|
|
|
|
GearControllerMode getMode() const {
|
|
|
|
return GearControllerMode::ButtonShift;
|
|
|
|
}
|
2020-09-02 17:17:58 -07:00
|
|
|
private:
|
2022-04-06 14:37:30 -07:00
|
|
|
ButtonDebounce debounceUp;
|
|
|
|
ButtonDebounce debounceDown;
|
2020-09-02 17:17:58 -07:00
|
|
|
};
|
|
|
|
|
2022-04-06 14:37:30 -07:00
|
|
|
ButtonShiftController* getButtonShiftController();
|
2022-04-23 04:34:39 -07:00
|
|
|
#endif // EFI_TCU
|