Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions OpenBionics_Beetroot/OpenBionics_Beetroot/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
#include "I2C_EEPROM.h"

///////////////////////////////////// CPU TEMP CONSTANTS ///////////////////////////////////////
#define CPU_TEMP_CMIN 25.0 // �C Nominal operating temperature
#define CPU_TEMP_TMIN -40.0 // �C Minimum operating temperature
#define CPU_TEMP_TMAX 85.0 // �C Maximum operating temperature
#define CPU_TEMP_CMIN 25.0 // �C Nominal operating temperature
#define CPU_TEMP_TMIN -40.0 // �C Minimum operating temperature
#define CPU_TEMP_TMAX 85.0 // �C Maximum operating temperature
#define CPU_TEMP_VMAX 3.63 // V Minimum operating voltage
#define CPU_TEMP_VMIN 1.62 // V Maximum operating voltage
#define CPU_TEMP_VOUTMAX 0.667 // V Temperature sensor output voltage
#define CPU_TEMP_AREF 3.3 // V Analogue reference
#define CPU_TEMP_ARES 10 // bit ADC resolution

float readCPUTemp(void); // read the CPU temperature, in �C
float readCPUTemp(void); // read the CPU temperature, in �C


///////////////////////////////////// EEPROM WRITE STRUCT ///////////////////////////////////////
Expand Down Expand Up @@ -104,8 +104,7 @@ FORCE_INLINE void serialprintPGM(const char *str)
#define MYSERIAL_PRINTLN(x) \
if( SERIALNONBLOCKCHECK )\
{\
MYSERIAL.print(x);\
MYSERIAL.write('\n');\
MYSERIAL.println(x);\
}

#define MYSERIAL_PRINT_PGM(x) serialprintPGM(PSTR(x));
Expand All @@ -120,7 +119,7 @@ FORCE_INLINE void serialprintPGM(const char *str)
///////////////////////////////////// NUMBER & DIGITS ///////////////////////////////////////
bool isEven(int n); // returns true if n is even
unsigned int getNumberOfDigits(unsigned int i); // get the number of digits in an unsigned int


///////////////////////////////////// CSV ///////////////////////////////////////
void convertToCSV(int *valArray, int len, char* outString); // converts a number (len) of integer variables from valArray to a CSV string (outString)
Expand Down