Skip to content

Commit

Permalink
added descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
doudar committed Feb 24, 2024
1 parent 9137146 commit 7befd18
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 72 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ include/telegram_token.h
Errors
SmartSpin_logfile.txt
*.err
.DS_Store
73 changes: 37 additions & 36 deletions include/Custom_Characteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,40 @@
#pragma once

// custom characteristic codes
#define BLE_firmwareUpdateURL 0x01
#define BLE_incline 0x02
#define BLE_simulatedWatts 0x03
#define BLE_simulatedHr 0x04
#define BLE_simulatedCad 0x05
#define BLE_simulatedSpeed 0x06
#define BLE_deviceName 0x07
#define BLE_shiftStep 0x08
#define BLE_stepperPower 0x09
#define BLE_stealthChop 0x0A
#define BLE_inclineMultiplier 0x0B
#define BLE_powerCorrectionFactor 0x0C
#define BLE_simulateHr 0x0D
#define BLE_simulateWatts 0x0E
#define BLE_simulateCad 0x0F
#define BLE_FTMSMode 0x10
#define BLE_autoUpdate 0x11
#define BLE_ssid 0x12
#define BLE_password 0x13
#define BLE_foundDevices 0x14
#define BLE_connectedPowerMeter 0x15
#define BLE_connectedHeartMonitor 0x16
#define BLE_shifterPosition 0x17
#define BLE_saveToLittleFS 0x18
#define BLE_targetPosition 0x19
#define BLE_externalControl 0x1A
#define BLE_syncMode 0x1B
#define BLE_reboot 0x1C
#define BLE_resetToDefaults 0x1D
#define BLE_stepperSpeed 0x1E
#define BLE_ERGSensitivity 0x1F
#define BLE_shiftDir 0x20
#define BLE_minBrakeWatts 0x21
#define BLE_maxBrakeWatts 0x22
#define BLE_restartBLE 0x23
#define BLE_scanBLE 0x24
#define BLE_firmwareUpdateURL 0x01 // URL used to update firmware
#define BLE_incline 0x02 // target incline like
#define BLE_simulatedWatts 0x03 // current watts
#define BLE_simulatedHr 0x04 // current hr
#define BLE_simulatedCad 0x05 // currend cad
#define BLE_simulatedSpeed 0x06 // current speed
#define BLE_deviceName 0x07 // Name of SmartSpin2k (Changes BLE name and URL for local access)
#define BLE_shiftStep 0x08 // Amount of stepper steps for a shift
#define BLE_stepperPower 0x09 // Stepper power in ma. Capped at 2000
#define BLE_stealthChop 0x0A // Stepper StealthChop (Makes it quieter with a little torque sacraficed)
#define BLE_inclineMultiplier 0x0B // Incline * this = steps to move. 3.0 is a good starting vlue for most bikes.
#define BLE_powerCorrectionFactor 0x0C // Correction factor for FTMS and CPS connected devices. .1-2.0
#define BLE_simulateHr 0x0D // If set to 1, override connected HR and use simulated above.
#define BLE_simulateWatts 0x0E // "" for Power Meter
#define BLE_simulateCad 0x0F // "" for Cad
#define BLE_FTMSMode 0x10 // get or set FTMS mode using values such as FitnessMachineControlPointProcedure::SetTargetPower
#define BLE_autoUpdate 0x11 // Attempt to update firmware on reboot?
#define BLE_ssid 0x12 // WiFi SSID. If it's not a network in range, fallback to AP mode made with devicename and "password"
#define BLE_password 0x13 // WiFi Password for known network. Fallback to "password" if network above not in range
#define BLE_foundDevices 0x14 // BLE fitness devices in range
#define BLE_connectedPowerMeter 0x15 // Desired Power Meter
#define BLE_connectedHeartMonitor 0x16 // Desired HR Monitor
#define BLE_shifterPosition 0x17 // Current Shifter Position
#define BLE_saveToLittleFS 0x18 // Write to make settings Permanent
#define BLE_targetPosition 0x19 // The target position of the stepper motor
#define BLE_externalControl 0x1A // Stop all internal control of stepper motor - let external device control motor
#define BLE_syncMode 0x1B // Stop stepper motor and set the current position to the target position
#define BLE_reboot 0x1C // Reboots the SmartSpin2k
#define BLE_resetToDefaults 0x1D // Resets the SmartSpin2k to defaults - Settings only, not the filesystem
#define BLE_stepperSpeed 0x1E // Stepper motor speed. Use cautiously. numbers above 3000 seem to cause a crash currently
#define BLE_ERGSensitivity 0x1F // Agressiveness of the control loop for ERG mode
#define BLE_shiftDir 0x20 // Flip flops the hardwired shifter direction
#define BLE_minBrakeWatts 0x21 // Minimum watts @ 90rpm . Used to set software end stop so motor doesn't crash and lose steps.
#define BLE_maxBrakeWatts 0x22 // "" Maximum watts for the other direction
#define BLE_restartBLE 0x23 // Closes all connections to the BLE client - used to connect new BLE devices the user selects.
#define BLE_scanBLE 0x24 // Scan for new BLE devices
#define BLE_firmwareVer 0x25 // String of the current firmware version
Loading

0 comments on commit 7befd18

Please sign in to comment.