From cd2e7e3a70db72af5493d1f377294c3bdce6a061 Mon Sep 17 00:00:00 2001 From: "C.Lee Taylor" Date: Tue, 12 Aug 2025 12:51:22 +0200 Subject: [PATCH] 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 @@ private: bool _enableOutputReport; bool _enableNordicUARTService; uint16_t _outputReportLength; - int8_t _transmitPowerLevel; + int8_t _transmitPowerLevel; public: @@ -299,7 +299,7 @@ public: 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 @@ public: 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