LEX_Threaded_Programming
Dependencies: Heater_V2 MODSERIAL Nanopb FastPWM ADS8568_ADC
Revision 36:fef05d541679, committed 2020-03-30
- Comitter:
- justinbuckland
- Date:
- Mon Mar 30 16:56:05 2020 +0000
- Parent:
- 35:aa35c6325dac
- Commit message:
- Removed old code no longer used
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 17 14:56:43 2020 +0000 +++ b/main.cpp Mon Mar 30 16:56:05 2020 +0000 @@ -181,11 +181,6 @@ flags.set(0x2); } -//void pressure_trigger() -//{ -// flags.set(0x4); -//} - //Other functions__________________________________________________________________ @@ -223,19 +218,6 @@ } } -void pressure_control() { - pressure_in = pressure_in * PRESSURE_SMOOTH_FACTOR + (1 - PRESSURE_SMOOTH_FACTOR) * pressure_1.read(); - pressure_out = pressure_out * PRESSURE_SMOOTH_FACTOR + (1 - PRESSURE_SMOOTH_FACTOR) * pressure_0.read(); - if (pressure_in < exp_config.fluidics.pressure_sensor_setpoint_adc - exp_config.fluidics.pressure_sensor_hysteresis_adc) { - led_1 = 1; -// pump = 1; - } - else if (pressure_in > exp_config.fluidics.pressure_sensor_setpoint_adc) { - led_1 = 0; -// pump = 0; - } -} - void set_point_routine(std::vector<memspcr_ThermalStep> profile) { int curr_time; @@ -278,14 +260,7 @@ int i_board = -1; int i_heater; float drive_cal_a, drive_cal_b; - - // turn off pump and valves and LED drive - // pump = 0; - // valve_0 = 0; - // valve_1 = 0; - // camTrigger = 0; - // ledDrive = 0; - + pc.baud(115200); adc.init(); @@ -344,10 +319,8 @@ pc.printf("# Waiting for signal to begin [PRESSURE] control (type p or press button 0)\n"); while (pc.getcNb()!='p' && !user_0); pc.printf("# Pressure control start signal received\n"); - //pressure_thread.start(& pressure_control); - //pressure_tick.attach_us(& pressure_control, exp_config.fluidics.pressure_control_loop_interval_ms * 1000); - //Start logging + //Start logging (pressure control takes place within logging thread) logging_thread.start(& log_state); log_tick.attach_us(& log_trigger,exp_config.logging_interval_ms * 1000);