Open seihan opened 4 years ago
@JosefKauer could you please review this PR? :) Many thanks!
@nopeslide
why did you copy all files into a new structure instead of using the existing files? the minimal changes in the original UART.c & Update_Signals.h & main.c do not justify such a split.
It's all in one directory because that's how Arduino projects work. The Arduino IDE does not look for files in subdirectories. This project is organized in a way that you can just open the .ino
file in the Arduino IDE and hit compile/upload (with the right target board). No extra Makefiles, no Atmel Studio, plain Arduino IDE.
This leads to either dead code, which won't be used in the future or at least duplicated code that gets hard to maintain. you could split up the original main.c into parts which can be used by by the old project and by your port.
The way I understood issue #7 this should replace the Atmel Studio code. Not sure if there is another upstream repository for the PULSOXY software that you want to track for future improvements.
Thanks for the info, I didn't know this about the arduino toolchain. Since all other solutions like symlinks etc would complicate the situation, I would say the copy is fine.
I had some issues reviewing this PR, because your initial copy already contained modifications (I couldn't easily determine your changes and ended up diffing each file by hand). Could you rebase your commits on a clean copy of the individual files?
Started from a clean working directory and force-pushed to update the PR. Also removed the unused init_ADC.h
header and prefixed the commit messages with "arduino-pulsoxy" for the import in this repo.
$ git diff --stat cadus/master
Source_codes/SPO2/arduino-pulsoxy/ADC.c | 39 ++++++++++++++
Source_codes/SPO2/arduino-pulsoxy/ADC.h | 16 ++++++
Source_codes/SPO2/arduino-pulsoxy/AGC.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++++
Source_codes/SPO2/arduino-pulsoxy/AGC.h | 21 ++++++++
Source_codes/SPO2/arduino-pulsoxy/LEDControl.c | 121 ++++++++++++++++++++++++++++++++++++++++++
Source_codes/SPO2/arduino-pulsoxy/LEDControl.h | 19 +++++++
Source_codes/SPO2/arduino-pulsoxy/README.md | 9 ++++
Source_codes/SPO2/arduino-pulsoxy/TC1_PWM_4kHz.c | 26 +++++++++
Source_codes/SPO2/arduino-pulsoxy/TC1_PWM_4kHz.h | 16 ++++++
Source_codes/SPO2/arduino-pulsoxy/TC2_8b_2ms.c | 20 +++++++
Source_codes/SPO2/arduino-pulsoxy/TC2_8b_2ms.h | 14 +++++
Source_codes/SPO2/arduino-pulsoxy/UART.c | 44 ++++++++++++++++
Source_codes/SPO2/arduino-pulsoxy/UART.h | 17 ++++++
Source_codes/SPO2/arduino-pulsoxy/Update_Signals.c | 44 ++++++++++++++++
Source_codes/SPO2/arduino-pulsoxy/Update_Signals.h | 28 ++++++++++
Source_codes/SPO2/arduino-pulsoxy/arduino-pulsoxy.ino | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Source_codes/SPO2/arduino-pulsoxy/calculatingSPO2.c | 55 +++++++++++++++++++
Source_codes/SPO2/arduino-pulsoxy/calculatingSPO2.h | 18 +++++++
18 files changed, 811 insertions(+)
For reference, this code matches the status of the arduino-pulsoxy repo https://github.com/seihan/arduino-pulsoxy/commit/a6a5245f263c9cfd0f7d4266963ed2b4d2ea0940
Due to the import into a subdirectory with git format-patch | git am
the line endings were automatically fixed, so that commit ended up empty and was dropped.
This is an import of this repository: https://github.com/seihan/arduino-pulsoxy with status from commit https://github.com/seihan/arduino-pulsoxy/commit/cbdd3d973bace2ab79aff6f8ae6719135ec84de5 into a subdirectory of the circuit boards repository.
Fixes: #7