summaryrefslogtreecommitdiff
path: root/src/common/input.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/input.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/common/input.h b/src/common/input.h
index bb42aaacc..995c35d9d 100644
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -28,7 +28,7 @@ enum class InputType {
28 Color, 28 Color,
29 Vibration, 29 Vibration,
30 Nfc, 30 Nfc,
31 Ir, 31 IrSensor,
32}; 32};
33 33
34// Internal battery charge level 34// Internal battery charge level
@@ -53,6 +53,15 @@ enum class PollingMode {
53 IR, 53 IR,
54}; 54};
55 55
56enum class CameraFormat {
57 Size320x240,
58 Size160x120,
59 Size80x60,
60 Size40x30,
61 Size20x15,
62 None,
63};
64
56// Vibration reply from the controller 65// Vibration reply from the controller
57enum class VibrationError { 66enum class VibrationError {
58 None, 67 None,
@@ -68,6 +77,13 @@ enum class PollingError {
68 Unknown, 77 Unknown,
69}; 78};
70 79
80// Ir camera reply from the controller
81enum class CameraError {
82 None,
83 NotSupported,
84 Unknown,
85};
86
71// Hint for amplification curve to be used 87// Hint for amplification curve to be used
72enum class VibrationAmplificationType { 88enum class VibrationAmplificationType {
73 Linear, 89 Linear,
@@ -176,6 +192,12 @@ struct LedStatus {
176 bool led_4{}; 192 bool led_4{};
177}; 193};
178 194
195// Raw data fom camera
196struct CameraStatus {
197 CameraFormat format{CameraFormat::None};
198 std::vector<u8> data{};
199};
200
179// List of buttons to be passed to Qt that can be translated 201// List of buttons to be passed to Qt that can be translated
180enum class ButtonNames { 202enum class ButtonNames {
181 Undefined, 203 Undefined,
@@ -233,6 +255,7 @@ struct CallbackStatus {
233 BodyColorStatus color_status{}; 255 BodyColorStatus color_status{};
234 BatteryStatus battery_status{}; 256 BatteryStatus battery_status{};
235 VibrationStatus vibration_status{}; 257 VibrationStatus vibration_status{};
258 CameraStatus camera_status{};
236}; 259};
237 260
238// Triggered once every input change 261// Triggered once every input change
@@ -281,6 +304,10 @@ public:
281 virtual PollingError SetPollingMode([[maybe_unused]] PollingMode polling_mode) { 304 virtual PollingError SetPollingMode([[maybe_unused]] PollingMode polling_mode) {
282 return PollingError::NotSupported; 305 return PollingError::NotSupported;
283 } 306 }
307
308 virtual CameraError SetCameraFormat([[maybe_unused]] CameraFormat camera_format) {
309 return CameraError::NotSupported;
310 }
284}; 311};
285 312
286/// An abstract class template for a factory that can create input devices. 313/// An abstract class template for a factory that can create input devices.