-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to ensure better testing use a specific test-settings file and add the necessary changes to the makefile.
- Loading branch information
Abász
committed
May 13, 2023
1 parent
9ddd3a1
commit 7b058fa
Showing
7 changed files
with
143 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,15 @@ | |
// | ||
// Documentation: https://docs.platformio.org/page/plus/debugging.html | ||
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html | ||
|
||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "C++ Launch", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/build/run_e2e_test.out", | ||
"program": "${workspaceFolder}/build/e2e/run_e2e_test.out", | ||
"args": [ | ||
"threshold.txt" | ||
], | ||
|
@@ -39,7 +40,7 @@ | |
"name": "C++ Test Debug", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/build/tests.out", | ||
"program": "${workspaceFolder}/build/unit/tests.out", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
|
@@ -60,6 +61,38 @@ | |
"ignoreFailures": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "platformio-debug", | ||
"request": "launch", | ||
"name": "PIO Debug", | ||
"executable": "${workspaceFolder}/esp-rowing-monitor/.pio/build/esp32/firmware.elf", | ||
"projectEnvName": "esp32", | ||
"toolchainBinDir": "${userHome}/.platformio/packages/[email protected]+2021r2-patch5/bin", | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"preLaunchTask": { | ||
"type": "PlatformIO", | ||
"task": "Pre-Debug" | ||
} | ||
}, | ||
{ | ||
"type": "platformio-debug", | ||
"request": "launch", | ||
"name": "PIO Debug (skip Pre-Debug)", | ||
"executable": "${workspaceFolder}/esp-rowing-monitor/.pio/build/esp32/firmware.elf", | ||
"projectEnvName": "esp32", | ||
"toolchainBinDir": "${userHome}/.platformio/packages/[email protected]+2021r2-patch5/bin", | ||
"internalConsoleOptions": "openOnSessionStart" | ||
}, | ||
{ | ||
"type": "platformio-debug", | ||
"request": "launch", | ||
"name": "PIO Debug (without uploading)", | ||
"executable": "${workspaceFolder}/esp-rowing-monitor/.pio/build/esp32/firmware.elf", | ||
"projectEnvName": "esp32", | ||
"toolchainBinDir": "${userHome}/.platformio/packages/[email protected]+2021r2-patch5/bin", | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"loadMode": "manual" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
|
||
#include "Arduino.h" | ||
|
||
#include "ArduinoLog.h" | ||
|
||
#include "globals.h" | ||
#include "stroke.service.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
#include "Arduino.h" | ||
|
||
#include "../settings.h" | ||
#include "macros.h" | ||
|
||
using std::string; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#pragma once | ||
|
||
#include "../src/utils/enums.h" | ||
|
||
// NOLINTBEGIN(cppcoreguidelines-macro-usage) | ||
|
||
#define DEFAULT_CPS_LOGGING_LEVEL ArduinoLogLevel::LogLevelTrace | ||
#define DEFAULT_BLE_SERVICE BleServiceFlag::CpsService | ||
#define ENABLE_WEBSOCKET_MONITOR true | ||
#define ENABLE_BLE_SERVICE true | ||
|
||
// Hardware settings | ||
#define SENSOR_PIN_NUMBER GPIO_NUM_26 | ||
#define IMPULSES_PER_REVOLUTION 3 | ||
#define FLYWHEEL_INERTIA 0.073 | ||
#define LED_BLINK_FREQUENCY 1000 | ||
#define SPROCKET_RADIUS 1.50 | ||
#define CONCEPT_2_MAGIC_NUMBER 2.8 | ||
|
||
// Sensor signal filter settings | ||
#define ROTATION_DEBOUNCE_TIME_MIN 7 | ||
#define ROWING_STOPPED_THRESHOLD_PERIOD 7000 | ||
|
||
// Drag factor filter settings | ||
#define GOODNESS_OF_FIT_THRESHOLD 0.97 | ||
#define MAX_DRAG_FACTOR_RECOVERY_PERIOD 6000 | ||
#define LOWER_DRAG_FACTOR_THRESHOLD 75 | ||
#define UPPER_DRAG_FACTOR_THRESHOLD 250 | ||
#define DRAG_COEFFICIENTS_ARRAY_LENGTH 1 | ||
|
||
// Stroke phase detection filter settings | ||
#define MINIMUM_POWERED_TORQUE 0 | ||
#define MINIMUM_DRAG_TORQUE 0 | ||
#define STROKE_DETECTION_TYPE STROKE_DETECTION_TORQUE | ||
#define MINIMUM_RECOVERY_SLOPE_MARGIN 0.0000022 // Only relevant if STROKE_DETECTION_TYPE is either BOTH or TORQUE | ||
#define MINIMUM_RECOVERY_SLOPE 0.01 // Only relevant if STROKE_DETECTION_TYPE is either BOTH or SLOPE | ||
#define STROKE_DEBOUNCE_TIME 300 | ||
#define IMPULSE_DATA_ARRAY_LENGTH 7 | ||
// #define FLOATING_POINT_PRECISION PRECISION_DOUBLE | ||
|
||
// Network settings | ||
#define PORT 80 | ||
|
||
// Device power management settings | ||
#define BATTERY_PIN_NUMBER GPIO_NUM_4 | ||
#define VOLTAGE_DIVIDER_RATIO 2 | ||
#define BATTERY_VOLTAGE_MIN 3.3 | ||
#define BATTERY_VOLTAGE_MAX 4.00 | ||
#define BATTERY_LEVEL_ARRAY_LENGTH 5 | ||
#define INITIAL_BATTERY_LEVEL_MEASUREMENT_COUNT 10 | ||
#define BATTERY_MEASUREMENT_FREQUENCY 10 | ||
#define DEEP_SLEEP_TIMEOUT 4 | ||
|
||
// NOLINTEND(cppcoreguidelines-macro-usage) |