Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
settings.h
00001 /**************************************** MAIN SETTINGS ****************************************/ 00002 //---------------------------------------------------------------------------------------------- 00003 // This file includes the system settings for Saltware such as boot parameters 00004 00005 00006 // If defined the system runs in test mode and executes testMain() in testing.cpp 00007 // Else the system runs in production mode and executes realMain() in main.cpp. 00008 //#define TEST_MODE 00009 00010 #ifdef TEST_MODE 00011 #define MAIN testMain 00012 #else 00013 #define MAIN realMain 00014 #endif 00015 00016 00017 // Do we stop the system after an alarm was raised? 00018 #define HALT_ON_ALARM 00019 00020 // Number of iterations before the system tries to adjust values / raises an alarm 00021 #define STARTUP_ITERATIONS 0 00022 00023 // Sleep for X ms after each iteration 00024 #define MAIN_THREAD_DELAY_MS 1000 00025 00026 // Number of seconds before a critical alarm is raised 00027 #define NUMBER_OF_SEC_BEFORE_CRITICAL_ALARM 30 00028 00029 // Number of seconds before an undesired alarm is raised 00030 #define NUMBER_OF_SEC_BEFORE_UNDESIRED_ALARM 300 00031 00032 00033 //Thresholds for temperature (in celcius) 00034 #define TEMP_MIN_CRIT 30.0f 00035 #define TEMP_MIN_UNDESIRED 32.0f 00036 #define TEMP_MAX_CRIT 40.0f 00037 #define TEMP_MAX_UNDESIRED 38.0f 00038 00039 //Thresholds for salinity (in ppt) 00040 #define SALT_MIN_CRIT 3.0f 00041 #define SALT_MIN_UNDESIRED 6.0f 00042 #define SALT_MAX_CRIT 12.0f 00043 #define SALT_MAX_UNDESIRED 9.0f 00044 00045 //Thresholds for overflow volumes (in ml) 00046 #define VOLUME_MIN_CRIT 300.0f 00047 #define VOLUME_MIN_UNDESIRED 300.0f 00048 #define VOLUME_MAX_CRIT 800.0f 00049 #define VOLUME_MAX_UNDESIRED 800.0f 00050 00051 // Distance between ultrasonic sensor and tank 00052 #define DISTANCE_TO_BASE 18.0f 00053 00054 // Temerature and Salinity measurements 00055 #define NUM_MEASUREMENTS 50 00056 // Delay between each measurement in ms for the Temperature sensor 00057 #define MEASUREMENT_DELAY 100 00058 00059 // Below this value, we assume salinity sensor is NC 00060 #define MIN_VALID_SALINITY 0.15f 00061 00062 //---------------------------------------------------------------------------------------------- 00063 /***********************************************************************************************/
Generated on Tue Jul 12 2022 18:59:29 by
1.7.2