Skip to content

Commit

Permalink
chatgpt improved platformio.ini, remove bullet from foot
Browse files Browse the repository at this point in the history
  • Loading branch information
s-t-a-n committed Jul 12, 2024
1 parent e39ed93 commit 88bb95c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 50 deletions.
60 changes: 14 additions & 46 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
Expand All @@ -29,27 +29,23 @@ build_flags =
-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
-DFAKEIT_ASSERT_ON_UNEXPECTED_METHOD_INVOCATION
-DMAGIC_ENUM_NO_ASSERT
build_unflags =
-std=gnu++11
build_unflags = -std=gnu++11

debug_build_flags =
-std=c++17
-std=gnu++17
-I include
${env.build_flags}
-D DEBUG_KASKAS
-D DEBUG_SPINE
-g3
-ggdb3
-O0
; -u_printf_float
; -u_scanf_float
; -DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
-D_GLIBCXX_DEBUG
-D_GLIBCXX_ASSERTIONS

check_tool = clangtidy
lib_ldf_mode = deep
check_flags =
clangtidy:
check_flags = clangtidy:
-extra-arg=-std=c++17 --checks=* -fix -Iinclude

lib_deps =
symlink:///home/stan/projects/krakakai/Spine
paulstoffregen/Time@^1.6.1
Expand All @@ -61,7 +57,6 @@ lib_deps =
https://github.com/RobTillaart/SHT31.git
https://github.com/Neargye/magic_enum.git


[embedded]
build_flags =
${env.build_flags}
Expand All @@ -77,13 +72,7 @@ upload_protocol = stlink
[env:nucleo_f429zi-debug]
extends = embedded
platform = ststm32
build_flags =
${env.build_flags}
-D DEBUG_SPINE
-D DEBUG_KASKAS
-u_printf_float
-u_scanf_float
-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
build_type = debug
board = nucleo_f429zi
framework = arduino
upload_protocol = stlink
Expand All @@ -100,10 +89,7 @@ debug_tool = stlink
[env:nucleo_f411re-debug]
extends = embedded
platform = ststm32
build_flags =
${env.build_flags}
-D DEBUG_SPINE
-D DEBUG_KASKAS
build_type = debug
board = genericSTM32F411RE
framework = arduino
debug_tool = stlink
Expand All @@ -120,17 +106,9 @@ lib_deps =
[env:sam3x8e-debug]
extends = embedded
platform = atmelsam
build_type = debug
board = due
framework = arduino
build_flags =
${env.build_flags}
-D DEBUG_SPINE
-D DEBUG_KASKAS
debug_build_flags =
${env.debug_build_flags}
-D ARDUINO=100
-D DEBUG_KASKAS
-D DEBUG_SPINE
lib_deps =
${env.lib_deps}
https://github.com/antodom/pwm_lib.git
Expand All @@ -141,14 +119,10 @@ build_flags =
${env.build_flags}
-D NATIVE
-D ARDUINO=100
-D DEBUG_KASKAS
-D DEBUG_SPINE
debug_build_flags =
${env.debug_build_flags}
-D NATIVE
-D ARDUINO=100
-D DEBUG_KASKAS
-D DEBUG_SPINE
build_type = debug
lib_compat_mode = off
test_ignore = test_embedded
Expand All @@ -165,15 +139,9 @@ build_flags =
-D NATIVE
-D UNITTEST
debug_build_flags =
${env.build_flags}
-D ARDUINO=100
-D NATIVE
${env.debug_build_flags}
-D UNITTEST
-O1
-g3
-ggdb3
-D_GLIBCXX_DEBUG
-D_GLIBCXX_ASSERTIONS
-fsanitize=address
lib_deps =
${env.lib_deps}
Expand Down
7 changes: 3 additions & 4 deletions src/kaskas/subsystems/data_acquisition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class DataAcquisition : public Component {
[this](const OptStringView&) { return RPCResult(datasources_as_string()); }),
RPCModel("getTimeSeries",
[this](const OptStringView&) {
if (!is_ready())
return RPCResult("Data acquisition is not ready for collection",
if (!is_warmed_up())
return RPCResult("Data acquisition has not warmed up yet",
RPCResult::State::BAD_RESULT);
return RPCResult(timeseries_as_string());
}),
Expand All @@ -74,8 +74,7 @@ class DataAcquisition : public Component {
void sideload_providers(io::VirtualStackFactory& ssf) override {}

public:
bool is_ready() const { return _status == Status::READY; }
bool is_warmed_up() const { return _status == Status::READY; }
bool is_warmed_up() const { return _status.Flags.warmed_up; }

std::string datasources_as_string() {
std::string fields;
Expand Down

0 comments on commit 88bb95c

Please sign in to comment.