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.
Diff: pulsegenerator.cpp
- Revision:
- 2:4fb5a8d15f9c
- Parent:
- 1:8f545f45d899
--- a/pulsegenerator.cpp Fri Nov 25 03:44:54 2016 +0000
+++ b/pulsegenerator.cpp Fri Dec 02 19:15:25 2016 +0000
@@ -2,6 +2,7 @@
#include "parameters.h"
#include "pulsegenerator.h"
#include "rtos.h"
+#include "motion.h"
@@ -32,7 +33,7 @@
return currentMode;
}
-uint32_t set_pace_period_ms(new_pace_period_ms){
+uint32_t set_pace_period_ms(uint32_t new_pace_period_ms){
next_pace_period_ms = new_pace_period_ms;
return pace_period_ms;
}
@@ -147,12 +148,13 @@
void pace_VOOR() {
if(isMotionThresholdExceeded()){
- set_vent_pulse_width_us();//pace faster
+ //set_vent_pulse_width_us();//pace faster
pace_VOO();
resetMotionDetection();
}
else {
- //pace with previous value
+ //set_vent_pulse_width_us();//pace with previous value
+ }
}
void begin_pace () {
@@ -167,7 +169,7 @@
while (true) {
paceThread.signal_set(0x4);
- wait_ms(pace_period_ms);
+ wait_ms(pace_period_ms - 180); //delay for every pace call
}
}