Attempt at fixing compile error
This commit is contained in:
parent
30afcdd8b7
commit
36b6402b2e
3 changed files with 14 additions and 47 deletions
|
|
@ -2,18 +2,6 @@
|
|||
#include "pP_function.h"
|
||||
#include <EEPROM.h>
|
||||
|
||||
int GAIN_FACTOR = GAIN_FACTOR_DEFAULT; // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x
|
||||
int followerThrs = FOLLOWER_THRESHOLD_DEFAULT;
|
||||
int compThrs = COMP_THRESHOLD_DEFAULT;
|
||||
int LOOP_DUR = LOOP_DUR_DEFAULT; // duration of time between ADC checks and other loop functions
|
||||
int TRG_DUR = TRG_DUR_DEFAULT; // duration of the Z-axis pulse sent, in ms
|
||||
int Hyst = HYST_DEFAULT; // Hysteresis value for ADC measurements
|
||||
int LOGIC = LOGIC_DEFAULT; // Trigger output logic (active low or active high)
|
||||
int PZDET = PZDET_DEFAULT; // Enable/disable piezo connection detection
|
||||
int Debug = 0;
|
||||
long voltMeterConstant = VM_CONST_DEFAULT;
|
||||
uint8_t pP_i2c_address = 0xa0;
|
||||
|
||||
/*------------------------------------------------*/
|
||||
void eraseEEPROM() {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,21 +5,15 @@
|
|||
|
||||
#define GAIN_FACTOR_DEFAULT 2 // Gain adjustment factor. 0=3x, 1=3.5x, 2=4.33x, 3=6x, 4=11x
|
||||
#define GAIN_FACTOR_ADDRESS 0
|
||||
#if !(defined(GAIN_FACTOR))
|
||||
extern int GAIN_FACTOR;
|
||||
#endif
|
||||
int GAIN_FACTOR = GAIN_FACTOR_DEFAULT;
|
||||
|
||||
#define FOLLOWER_THRESHOLD_DEFAULT 1450 // Voltage follower default voltage in mV
|
||||
#define FOLLOWER_THRESHOLD_ADDRESS 4
|
||||
#if !(defined(followerThrs))
|
||||
extern int followerThrs;
|
||||
#endif
|
||||
int followerThrs = 1450;
|
||||
|
||||
#define COMP_THRESHOLD_DEFAULT 2850 // Comparatore Vref default voltage in mV
|
||||
#define COMP_THRESHOLD_ADDRESS 8
|
||||
#if !(defined(compThrs))
|
||||
extern int compThrs;
|
||||
#endif
|
||||
int compThrs = COMP_THRESHOLD_DEFAULT;
|
||||
|
||||
#ifndef InitCount
|
||||
#define InitCount 6 // Number of times to blink the LED on start
|
||||
|
|
@ -27,49 +21,33 @@
|
|||
|
||||
#define LOOP_DUR_DEFAULT 50 // duration of time between ADC checks and other loop functions
|
||||
#define LOOP_DUR_ADDRESS 12
|
||||
#if !(defined(LOOP_DUR))
|
||||
extern int LOOP_DUR;
|
||||
#endif
|
||||
int LOOP_DUR = LOOP_DUR_DEFAULT;
|
||||
|
||||
#define TRG_DUR_DEFAULT 20 // duration of the Z-axis pulse sent, in ms
|
||||
#define TRG_DUR_ADDRESS 16
|
||||
#if !(defined(TRG_DUR))
|
||||
extern int TRG_DUR;
|
||||
#endif
|
||||
int TRG_DUR = TRG_DUR_DEFAULT;
|
||||
|
||||
#define HYST_DEFAULT 20
|
||||
#define HYST_ADDRESS 20
|
||||
#if !(defined(Hyst))
|
||||
extern int Hyst; // Hysteresis value for ADC measurements
|
||||
#endif
|
||||
int Hyst = HYST_DEFAULT; // Hysteresis value for ADC measurements
|
||||
|
||||
#define LOGIC_DEFAULT 1
|
||||
#define LOGIC_ADDRESS 32
|
||||
#if !(defined(LOGIC))
|
||||
extern int LOGIC; // Trigger logic scheme, Active LOW is default
|
||||
#endif
|
||||
int LOGIC = LOGIC_DEFAULT; // Trigger logic scheme, Active LOW is default
|
||||
|
||||
#define PZDET_DEFAULT 0
|
||||
#define PZDET_ADDRESS 26
|
||||
#if !(defined(PZDET))
|
||||
extern int PZDET; // Enable or disable piezo connection detection, default is off
|
||||
#endif
|
||||
int PZDET = PZDET_DEFAULT; // Enable or disable piezo connection detection, default is off
|
||||
|
||||
#if !(defined(Debug))
|
||||
extern int Debug;
|
||||
#endif
|
||||
int Debug = 0;
|
||||
|
||||
#define VM_CONST_ADDRESS 28
|
||||
#define VM_CONST_DEFAULT 1125300L
|
||||
#if !(defined(voltMeterConstant))
|
||||
extern long voltMeterConstant; // For fine tuning input voltage sense
|
||||
#endif
|
||||
long voltMeterConstant = VM_CONST_DEFAULT; // For fine tuning input voltage sense
|
||||
|
||||
#ifdef I2C_INPUT
|
||||
#define I2C_SLAVE_ADDRESS 24
|
||||
#if !(defined(pP_i2c_address))
|
||||
extern uint8_t pP_i2c_address; // I2C Bus Address
|
||||
#endif
|
||||
uint8_t pP_i2c_address = 0xa0; // I2C Bus Address
|
||||
#endif // I2C_INPUT
|
||||
|
||||
void eraseEEPROM();
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#define PP_FUNCTION_H
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "pP_config.h"
|
||||
#include "pP_volatile.h"
|
||||
#include "pP_pins.h"
|
||||
#include "stdint.h"
|
||||
|
|
|
|||
Loading…
Reference in a new issue