![](/media/cache/group/Bl7MzJTB.jpg.50x50_q85.jpg)
mit Buttons/PWM als einzelne cpp und init in main
Dependencies: mbed mbed-rtos X_NUCLEO_IHM02A1
ST_DUO.cpp@34:0dee9a606869, 2019-04-24 (annotated)
- Committer:
- scherfa2
- Date:
- Wed Apr 24 21:08:27 2019 +0000
- Revision:
- 34:0dee9a606869
- Parent:
- 33:de144094bdd1
asdf
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hagenrap | 33:de144094bdd1 | 1 | #include "SETUP.h" |
hagenrap | 33:de144094bdd1 | 2 | |
scherfa2 | 27:23bd03a6a6f6 | 3 | |
scherfa2 | 27:23bd03a6a6f6 | 4 | int StatusDUO=DUO_DEFAULT; |
scherfa2 | 34:0dee9a606869 | 5 | extern volatile bool buttonSTART_pressed; |
scherfa2 | 34:0dee9a606869 | 6 | extern volatile bool buttonSTART_enabled; |
scherfa2 | 34:0dee9a606869 | 7 | extern PwmOut Servo; |
scherfa2 | 34:0dee9a606869 | 8 | |
scherfa2 | 34:0dee9a606869 | 9 | void EntryDuoStart() |
scherfa2 | 34:0dee9a606869 | 10 | { |
scherfa2 | 34:0dee9a606869 | 11 | gotoxy(1,1); |
scherfa2 | 34:0dee9a606869 | 12 | DisplaySendeString("Modus: DUO-Betrieb"); |
scherfa2 | 34:0dee9a606869 | 13 | gotoxy(1,3); |
scherfa2 | 34:0dee9a606869 | 14 | DisplaySendeString("Betrieb gestartet"); |
scherfa2 | 34:0dee9a606869 | 15 | |
scherfa2 | 34:0dee9a606869 | 16 | SpleisserMotorFWD(); |
scherfa2 | 34:0dee9a606869 | 17 | |
scherfa2 | 34:0dee9a606869 | 18 | //Test pwm |
scherfa2 | 34:0dee9a606869 | 19 | ServoAusschuss(0.001, 0.5); |
scherfa2 | 34:0dee9a606869 | 20 | |
scherfa2 | 34:0dee9a606869 | 21 | StatusDUO=DUO_START; |
scherfa2 | 34:0dee9a606869 | 22 | } |
scherfa2 | 34:0dee9a606869 | 23 | |
scherfa2 | 27:23bd03a6a6f6 | 24 | |
scherfa2 | 27:23bd03a6a6f6 | 25 | void EntryDUO() |
scherfa2 | 27:23bd03a6a6f6 | 26 | { |
scherfa2 | 27:23bd03a6a6f6 | 27 | switch(StatusDUO) |
scherfa2 | 27:23bd03a6a6f6 | 28 | { |
scherfa2 | 27:23bd03a6a6f6 | 29 | case DUO_DEFAULT: |
scherfa2 | 34:0dee9a606869 | 30 | printf("DUO_MODUS\r\n"); |
scherfa2 | 34:0dee9a606869 | 31 | // SpleisserMotorFWD(); |
scherfa2 | 34:0dee9a606869 | 32 | |
scherfa2 | 34:0dee9a606869 | 33 | |
scherfa2 | 34:0dee9a606869 | 34 | if(buttonSTART_pressed==true) |
scherfa2 | 34:0dee9a606869 | 35 | { |
scherfa2 | 34:0dee9a606869 | 36 | buttonSTART_pressed=false; |
scherfa2 | 34:0dee9a606869 | 37 | buttonSTART_diable_cb(); |
scherfa2 | 34:0dee9a606869 | 38 | EntryDuoStart(); |
scherfa2 | 34:0dee9a606869 | 39 | |
scherfa2 | 34:0dee9a606869 | 40 | } |
scherfa2 | 34:0dee9a606869 | 41 | |
scherfa2 | 27:23bd03a6a6f6 | 42 | break; |
scherfa2 | 27:23bd03a6a6f6 | 43 | |
scherfa2 | 27:23bd03a6a6f6 | 44 | case DUO_START: |
scherfa2 | 34:0dee9a606869 | 45 | printf("DUO_START\r\n"); |
scherfa2 | 34:0dee9a606869 | 46 | |
scherfa2 | 27:23bd03a6a6f6 | 47 | break; |
scherfa2 | 27:23bd03a6a6f6 | 48 | |
scherfa2 | 27:23bd03a6a6f6 | 49 | case DUO_FilamentIN: |
scherfa2 | 27:23bd03a6a6f6 | 50 | break; |
scherfa2 | 27:23bd03a6a6f6 | 51 | |
scherfa2 | 27:23bd03a6a6f6 | 52 | case DUO_Schneiden1: |
scherfa2 | 27:23bd03a6a6f6 | 53 | break; |
scherfa2 | 27:23bd03a6a6f6 | 54 | |
scherfa2 | 27:23bd03a6a6f6 | 55 | case DUO_Schneiden2: |
scherfa2 | 27:23bd03a6a6f6 | 56 | break; |
scherfa2 | 27:23bd03a6a6f6 | 57 | |
scherfa2 | 27:23bd03a6a6f6 | 58 | case DUO_Spleissen: |
scherfa2 | 27:23bd03a6a6f6 | 59 | break; |
scherfa2 | 27:23bd03a6a6f6 | 60 | |
scherfa2 | 27:23bd03a6a6f6 | 61 | case DUO_Normalbetrieb: |
scherfa2 | 27:23bd03a6a6f6 | 62 | break; |
scherfa2 | 27:23bd03a6a6f6 | 63 | |
scherfa2 | 27:23bd03a6a6f6 | 64 | case DUO_Finish: |
scherfa2 | 27:23bd03a6a6f6 | 65 | break; |
scherfa2 | 27:23bd03a6a6f6 | 66 | |
scherfa2 | 27:23bd03a6a6f6 | 67 | case DUO_FERTIG: |
scherfa2 | 27:23bd03a6a6f6 | 68 | break; |
scherfa2 | 27:23bd03a6a6f6 | 69 | |
scherfa2 | 27:23bd03a6a6f6 | 70 | case DUO_STOERUNG: |
scherfa2 | 27:23bd03a6a6f6 | 71 | break; |
scherfa2 | 27:23bd03a6a6f6 | 72 | |
scherfa2 | 27:23bd03a6a6f6 | 73 | } |
scherfa2 | 27:23bd03a6a6f6 | 74 | } |
scherfa2 | 27:23bd03a6a6f6 | 75 |