Skip to content

Commit

Permalink
Fixing issue 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Seidle committed Feb 15, 2018
1 parent 2596e5a commit edebad6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/Example8_SPO2/Example8_SPO2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MAX30105 particleSensor;

#define MAX_BRIGHTNESS 255

#if defined(ARDUINO_AVR_UNO)
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.
uint16_t irBuffer[100]; //infrared LED sensor data
Expand Down
2 changes: 1 addition & 1 deletion src/spo2_algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#include "arduino.h"
#include "spo2_algorithm.h"

#if defined(ARDUINO_AVR_UNO)
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.
void maxim_heart_rate_and_oxygen_saturation(uint16_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint16_t *pun_red_buffer, int32_t *pn_spo2, int8_t *pch_spo2_valid,
Expand Down
2 changes: 1 addition & 1 deletion src/spo2_algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int32_t an_x[ BUFFER_SIZE]; //ir
static int32_t an_y[ BUFFER_SIZE]; //red


#if defined(ARDUINO_AVR_UNO)
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.
void maxim_heart_rate_and_oxygen_saturation(uint16_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint16_t *pun_red_buffer, int32_t *pn_spo2, int8_t *pch_spo2_valid, int32_t *pn_heart_rate, int8_t *pch_hr_valid);
Expand Down

0 comments on commit edebad6

Please sign in to comment.