Skip to content

Commit

Permalink
Ci/platform mods (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui authored Jan 7, 2025
2 parents 1644a11 + 48945b7 commit 4cac3b5
Show file tree
Hide file tree
Showing 28 changed files with 1,036 additions and 155 deletions.
10 changes: 10 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
"${workspaceFolder}/src"
]
}
},
{
"name": "cmake",
"includePath": [
"${workspaceFolder}/src"
],
"cStandard": "c11",
"cppStandard": "c++11",
"configurationProvider": "ms-vscode.cmake-tools",
"mergeConfigurations": true
}
],
"version": 4
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.14)
project(SmartfinTests)
set(CMAKE_CXX_STANDARD 14)
project(Smartfin)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_subdirectory(external/googletest)
Expand All @@ -13,3 +13,4 @@ set(GTEST_SOURCE_FILES
add_executable(googletests ${GTEST_SOURCE_FILES})
target_link_libraries(googletests gtest gtest_main pthread)

add_subdirectory(pc_hal)
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ Not charging and less than 10 ms have passed | No Change |
Not charging and at least 10 ms have passed | LED ON |

## Wet Dry LED
TODO
TODO

# Installation for for GCC
Run in a Linux environment

1. Install build-essentials and cmake, gdb
2. Ensure submodules are initialized and updated
57 changes: 57 additions & 0 deletions pc_hal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
cmake_minimum_required(VERSION 3.14)
project(smartfin_pc)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Threads REQUIRED)
find_package(Curses REQUIRED)

include_directories(
.
../src/
../lib/tracker-edge/src
../lib/gps-ublox/src
../lib/gps-nmea-parser/src
../lib/gps-quectel/src
${CURSES_INCLUDE_DIR}
)

set(SMARTFIN_SOURCE_FILES
main.cpp
Particle_dummy.cpp
../src/cli/flog.cpp
../src/cli/conio.cpp
../src/system.cpp
../src/cellular/sf_cloud.cpp
../src/sleepTask.cpp
../src/cli/cli.cpp
../src/states.cpp
../src/mfgTest/mfgTest.cpp
../src/chargeTask.cpp
../src/cellular/dataUpload.cpp
../src/sys/NVRAM.cpp
../src/cellular/recorder.cpp
../src/sys/led.cpp
../src/watersensor/waterSensor.cpp
../src/temperature/max317275_cpp.cpp
../src/temperature/tmpSensor.cpp
../src/vers.cpp
../src/cellular/encoding/base64.c
../src/cli/menu.cpp
../src/cellular/deploy.cpp
../src/i2c/i2c.cpp
../src/util.cpp
../src/cli/menuItems/systemCommands.cpp
../src/cli/menuItems/debugCommands.cpp
../src/imu/imu.cpp
../src/cli/cliDebug.cpp
../src/cli/menuItems/gpsCommands.cpp
../src/debug/recorder_debug.cpp
../src/debug/session_debug.cpp
../src/fileCLI/fileCLI.cpp
)
add_executable(smartfin_pc ${SMARTFIN_SOURCE_FILES})
target_link_libraries(smartfin_pc
Threads::Threads
${CURSES_LIBRARIES}
)
Loading

0 comments on commit 4cac3b5

Please sign in to comment.