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