diff --git a/.gitignore b/.gitignore index 36b6282..be187ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .DS_Store -.DS_Store -Software/.DS_Store -Software/Arduino/.DS_Store -Software/Arduino/libraries/.DS_Store +*.bak +Software\OnSpeedTeensy_AHRS\OnSpeedTeensy_AHRS.ino.TEENSY36.hex +Software\OnSpeedTeensy_AHRS\local_config.h +Software\OnSpeedWifi\local_config.h diff --git a/Software/OnSpeedTeensy_AHRS/OnSpeedTeensy_AHRS.ino b/Software/OnSpeedTeensy_AHRS/OnSpeedTeensy_AHRS.ino index 42e10a0..27e63a8 100644 --- a/Software/OnSpeedTeensy_AHRS/OnSpeedTeensy_AHRS.ino +++ b/Software/OnSpeedTeensy_AHRS/OnSpeedTeensy_AHRS.ino @@ -97,23 +97,7 @@ #define DEFAULT_CONFIG default_config -// data logging frequency -#define LOGDATA_PRESSURE_RATE -//#define LOGDATA_IMU_RATE - -// AOA probe type -//#define SPHERICAL_PROBE // uncomment this if using custom OnSpeed spherical head probe. - -// imu type -//#define IMUTYPE_LSM9DS1 // original IMU -#define IMUTYPE_ISM330DHCX // new IMU with less temperature drift - -// boom type -//#define NOBOOMCHECKSUM // for booms that don't have a checksum byte in their data stream uncomment this line. - -// curves config -#define MAX_AOA_CURVES 5 // maximum number of AOA curves (flap/gear positions) -#define MAX_CURVE_COEFF 4 // 4 coefficients=3rd degree polynomial function for calibration curves +#include "local_config.h" // glimit settings #define GLIMIT_REPEAT_TIMEOUT 3000 // milliseconds to repeat G limit. @@ -127,9 +111,6 @@ #define PCOEFF(p_fwd,p_45) p_45/p_fwd; // CP3 // ratiometric CP. CP1 & CP2 are not ratiometric. Can't divide with P45, it goes through zero on Dynon probe. #endif -// OAT sensor available -//#define OAT_AVAILABLE // DS18B20 sensor on pin 9 - // boom curves //#define BOOM_ALPHA_CALC(x) 7.0918*pow(10,-13)*x*x*x*x - 1.1698*pow(10,-8)*x*x*x + 7.0109*pow(10,-5)*x*x - 0.21624*x + 310.21; //degrees //#define BOOM_BETA_CALC(x) 2.0096*pow(10,-13)*x*x*x*x - 3.7124*pow(10,-9)*x*x*x + 2.5497*pow(10,-5)*x*x - 3.7141*pow(10,-2)*x - 72.505; //degrees @@ -147,16 +128,6 @@ #define BOOM_PACKET_SIZE 50 #define EFIS_PACKET_SIZE 512 -//analog resolution (use 13 bit analog resolution, default is 10-bit) -//#define HIGHRES_ANALOGREAD - -// box functionality config -//String dataSource = "TESTPOT"; // potentiometer wiper on Pin 10 of DSUB 15 connector -//String dataSource = "RANGESWEEP"; -String dataSource = "SENSORS"; -//String dataSource = "REPLAYLOGFILE"; -String replayLogFileName=""; - // type definitions typedef struct { int Count; diff --git a/Software/OnSpeedTeensy_AHRS/default_config.h b/Software/OnSpeedTeensy_AHRS/default_config.h index db10f19..a0b148d 100644 --- a/Software/OnSpeedTeensy_AHRS/default_config.h +++ b/Software/OnSpeedTeensy_AHRS/default_config.h @@ -1,3 +1,14 @@ +// +// If you are contributing code back to the project, and you don't want to send changes +// to this file back to the main repository, add the following line to your .gitignore file: +// Software\OnSpeedTeensy_AHRS\default_config.h +// +// Alternatively, you can add the same line to .git/info/exclude & run the following command +// to ignore changes to this file locally, without polluting the project-wide .gitignore file: +// git update-index --skip-worktree Software\OnSpeedTeensy_AHRS\default_config.h +// reference: https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally +// + // **** default config for RV-4 **** const char default_config[] PROGMEM = R"=====( diff --git a/Software/OnSpeedTeensy_AHRS/local_config-sample.h b/Software/OnSpeedTeensy_AHRS/local_config-sample.h new file mode 100644 index 0000000..80c4ea1 --- /dev/null +++ b/Software/OnSpeedTeensy_AHRS/local_config-sample.h @@ -0,0 +1,48 @@ +// +// installation-specific configuration for OnSpeedTeensy_AHRS.ino +// This file localizes values that are typically changed once for an installation +// in a specific aircraft, and rarely touched again. +// +// SETUP INSTRUCTIONS: (must be completed before compiling OnSpeedTeensy_AHRS.ino) +// 1. Copy this file to local_config.h in the same directory +// 2. Edit values below as appropriate to your installation & save changes +// 3. With future updates to the main repository, compare your local_config.h to the +// project's local_config-sample.h to determine if any new settings need to be added +// to your local_config.h +// +// If you are contributing code back to the project, your changes to this file will not be sent +// to the main repository due to the following entry in the .gitignore file: +// Software\OnSpeedTeensy_AHRS\local_config.h +// + +// data logging frequency +#define LOGDATA_PRESSURE_RATE +//#define LOGDATA_IMU_RATE + +// AOA probe type +//#define SPHERICAL_PROBE // uncomment this if using custom OnSpeed spherical head probe. + +// imu type +//#define IMUTYPE_LSM9DS1 // original IMU +#define IMUTYPE_ISM330DHCX // new IMU with less temperature drift + +// boom type +//#define NOBOOMCHECKSUM // for booms that don't have a checksum byte in their data stream uncomment this line. + +// curves config +#define MAX_AOA_CURVES 5 // maximum number of AOA curves (flap/gear positions) +#define MAX_CURVE_COEFF 4 // 4 coefficients=3rd degree polynomial function for calibration curves + +// OAT sensor available +//#define OAT_AVAILABLE // DS18B20 sensor on pin 9 + +//analog resolution (use 13 bit analog resolution, default is 10-bit) +//#define HIGHRES_ANALOGREAD + +// box functionality config +//String dataSource = "TESTPOT"; // potentiometer wiper on Pin 10 of DSUB 15 connector +//String dataSource = "RANGESWEEP"; +String dataSource = "SENSORS"; +//String dataSource = "REPLAYLOGFILE"; +String replayLogFileName=""; + diff --git a/Software/OnSpeedWifi/OnSpeedWifi.ino b/Software/OnSpeedWifi/OnSpeedWifi.ino index 406c6b8..42c9a32 100644 --- a/Software/OnSpeedWifi/OnSpeedWifi.ino +++ b/Software/OnSpeedWifi/OnSpeedWifi.ino @@ -37,10 +37,7 @@ String wifi_fw="3.3.7"; // wifi firmware version -const char* ssid = "OnSpeed"; -const char* password = "angleofattack"; -String clientwifi_ssid="HangarWifi"; // currently not needed -String clientwifi_password="test"; // currently not needed +#include "local_config.h" // initialize live display values float AOA=0.0; @@ -69,11 +66,6 @@ String uploadConfigString; DNSServer dnsServer; WebServer server(80); -// initialize config variables -#define MAX_AOA_CURVES 5 // maximum number of AOA curves (flap/gear positions) -#define MAX_CURVE_COEFF 4 // 4 coefficients=3rd degree polynomial function for calibration curves -String dataSource = "SENSORS"; - String replayLogFileName = ""; typedef struct { @@ -164,16 +156,8 @@ bool sdLogging; //not used here String teensyVersion=""; - -// calibration wizard variables -int acGrossWeight=2700; -int acCurrentWeight=2500; -float acVldmax=91; -float acGlimit=3.8; - #include // library with setting functions - void updateHeader() { pageHeader=String(htmlHeader); diff --git a/Software/OnSpeedWifi/local_config-sample.h b/Software/OnSpeedWifi/local_config-sample.h new file mode 100644 index 0000000..c017e0c --- /dev/null +++ b/Software/OnSpeedWifi/local_config-sample.h @@ -0,0 +1,32 @@ +// +// installation-specific configuration for OnSpeedWifi.ino +// This file localizes values that are typically changed once for an installation +// in a specific aircraft, and rarely touched again. +// +// SETUP INSTRUCTIONS: (must be completed before compiling OnSpeedWifi.ino) +// 1. Copy this file to local_config.h in the same directory +// 2. Edit values below as appropriate to your installation & save changes +// 3. With future updates to the main repository, compare your local_config.h to the +// project's local_config-sample.h to determine if any new settings need to be added +// to your local_config.h +// +// If you are contributing code back to the project, your changes to this file will not be sent +// to the main repository due to the following entry in the .gitignore file: +// Software\OnSpeedWifi\local_config-sample.h +// + +const char* ssid = "OnSpeed"; +const char* password = "angleofattack"; +String clientwifi_ssid="HangarWifi"; // currently not needed +String clientwifi_password="test"; // currently not needed + +// initialize config variables +#define MAX_AOA_CURVES 5 // maximum number of AOA curves (flap/gear positions) +#define MAX_CURVE_COEFF 4 // 4 coefficients=3rd degree polynomial function for calibration curves +String dataSource = "SENSORS"; + +// calibration wizard variables +int acGrossWeight=2700; +int acCurrentWeight=2500; +float acVldmax=91; +float acGlimit=3.8;