ec
Fork of EC by
Diff: EC.cpp
- Revision:
- 10:216d5a573dc7
- Parent:
- 9:a919aa92e65e
- Child:
- 11:b96009f8b9fd
--- a/EC.cpp Mon Nov 28 13:01:04 2016 +0000 +++ b/EC.cpp Tue Nov 29 12:45:45 2016 +0000 @@ -45,7 +45,7 @@ first=true; now_time=timer.read(); RPM=60/(now_time-old_time); - if((RPM_old-RPM)>250){ + if((RPM_old-RPM)>RPM_th){ printf("\r\n CAUTION : speed downed drastically\r\n"); NVIC_SystemReset(); } @@ -83,6 +83,7 @@ dt=t; solution=s; defsolution=s; + RPM_th=250; } int Ec::getCount(){ @@ -122,3 +123,6 @@ return rev; } +void Ec::changeRPM_th(int th){ + RPM_th=th; +} \ No newline at end of file