From cd2e7e3a70db72af5493d1f377294c3bdce6a061 Mon Sep 17 00:00:00 2001 From: "C.Lee Taylor" Date: Tue, 12 Aug 2025 12:51:22 +0200 Subject: [PATCH 1/2] Update set char values to use const char --- BleGamepadConfiguration.cpp | 10 +++++----- BleGamepadConfiguration.h | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/BleGamepadConfiguration.cpp b/BleGamepadConfiguration.cpp index af18b9f..8a6ba03 100644 --- a/BleGamepadConfiguration.cpp +++ b/BleGamepadConfiguration.cpp @@ -206,11 +206,11 @@ void BleGamepadConfiguration::setSimulationMin(int16_t value) { _simulationMin = void BleGamepadConfiguration::setSimulationMax(int16_t value) { _simulationMax = value; } void BleGamepadConfiguration::setMotionMin(int16_t value) { _motionMin = value; } void BleGamepadConfiguration::setMotionMax(int16_t value) { _motionMax = value; } -void BleGamepadConfiguration::setModelNumber(char *value) { _modelNumber = value; } -void BleGamepadConfiguration::setSoftwareRevision(char *value) { _softwareRevision = value; } -void BleGamepadConfiguration::setSerialNumber(char *value) { _serialNumber = value; } -void BleGamepadConfiguration::setFirmwareRevision(char *value) { _firmwareRevision = value; } -void BleGamepadConfiguration::setHardwareRevision(char *value) { _hardwareRevision = value; } +void BleGamepadConfiguration::setModelNumber(const char *value) { _modelNumber = value; } +void BleGamepadConfiguration::setSoftwareRevision(const char *value) { _softwareRevision = value; } +void BleGamepadConfiguration::setSerialNumber(const char *value) { _serialNumber = value; } +void BleGamepadConfiguration::setFirmwareRevision(const char *value) { _firmwareRevision = value; } +void BleGamepadConfiguration::setHardwareRevision(const char *value) { _hardwareRevision = value; } void BleGamepadConfiguration::setEnableOutputReport(bool value) { _enableOutputReport = value; } void BleGamepadConfiguration::setEnableNordicUARTService(bool value) { _enableNordicUARTService = value; } void BleGamepadConfiguration::setOutputReportLength(uint16_t value) { _outputReportLength = value; } diff --git a/BleGamepadConfiguration.h b/BleGamepadConfiguration.h index c7b0c4f..83f04ae 100644 --- a/BleGamepadConfiguration.h +++ b/BleGamepadConfiguration.h @@ -240,7 +240,7 @@ class BleGamepadConfiguration bool _enableOutputReport; bool _enableNordicUARTService; uint16_t _outputReportLength; - int8_t _transmitPowerLevel; + int8_t _transmitPowerLevel; public: @@ -299,7 +299,7 @@ class BleGamepadConfiguration bool getEnableOutputReport(); bool getEnableNordicUARTService(); uint16_t getOutputReportLength(); - int8_t getTXPowerLevel(); + int8_t getTXPowerLevel(); void setControllerType(uint8_t controllerType); void setAutoReport(bool value); @@ -341,15 +341,15 @@ class BleGamepadConfiguration void setSimulationMax(int16_t value); void setMotionMin(int16_t value); void setMotionMax(int16_t value); - void setModelNumber(char *value); - void setSoftwareRevision(char *value); - void setSerialNumber(char *value); - void setFirmwareRevision(char *value); - void setHardwareRevision(char *value); + void setModelNumber(const char *value); + void setSoftwareRevision(const char *value); + void setSerialNumber(const char *value); + void setFirmwareRevision(const char *value); + void setHardwareRevision(const char *value); void setEnableOutputReport(bool value); void setEnableNordicUARTService(bool value); void setOutputReportLength(uint16_t value); - void setTXPowerLevel(int8_t value); + void setTXPowerLevel(int8_t value); }; #endif From b7473bdc5f345b4296454f0e4185a5a11ea6f4a9 Mon Sep 17 00:00:00 2001 From: "C.Lee Taylor" Date: Tue, 12 Aug 2025 13:22:20 +0200 Subject: [PATCH 2/2] just some formatting --- BleGamepadConfiguration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BleGamepadConfiguration.cpp b/BleGamepadConfiguration.cpp index 8a6ba03..86cb3e4 100644 --- a/BleGamepadConfiguration.cpp +++ b/BleGamepadConfiguration.cpp @@ -27,7 +27,7 @@ BleGamepadConfiguration::BleGamepadConfiguration() : _controllerType(CONTROLLER_ _enableOutputReport(false), _enableNordicUARTService(false), _outputReportLength(64), - _transmitPowerLevel(9) + _transmitPowerLevel(9) { }