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
Fork of Roboshark_V62 by
Diff: StateMachine.cpp
- Revision:
- 9:feabe0b7cea4
- Parent:
- 8:d0a27278c108
diff -r d0a27278c108 -r feabe0b7cea4 StateMachine.cpp
--- a/StateMachine.cpp Mon May 07 14:11:06 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-
-// Statemachine
-//V04.18
-// V. Ahlers
-
-//Wird nicht mehr gebraucht
-
-#include <mbed.h>
-#include "StateMachine.h"
-
-using namespace std;
-
-StateMachine::StateMachine(int IrR, int IrL, int IrF) : IrR(IrR), IrL(IrL), IrF(IrF) {}
-
-StateMachine::~StateMachine (){}
-
-int StateMachine :: drive() {
-
-
-
- if((IrR==0) && (IrL==0) && (IrF==1)){
- caseDrive = 2; // Folge: 90 Grad nach rechts drehen
- }else if ((IrR==0) && (IrL==1) && (IrF==0)){
- caseDrive = 2; // Folge: 90 Grad nach rechts drehen
- }else if ((IrR==0) && (IrL==1) && (IrF==1)){
- caseDrive = 2; // Folge: 90 Grad nach rechts drehen
- }else if ((IrR==1) && (IrL==0) && (IrF==0)){
- caseDrive = 1; // Folge: geradeaus fahren
- }else if ((IrR==1) && (IrL==0) && (IrF==1)){
- caseDrive = 3; // Folge: 270 Grad nach rechts drehen
- }else if ((IrR==1) && (IrL==1) && (IrF==0)){
- caseDrive = 1; // Folge: geradeaus fahren
- }else if ((IrR==1) && (IrL==1) && (IrF==1)){
- caseDrive = 4; // Folge: 180 Grad nach rechts drehen
- }else{ caseDrive=0;
- }
-
- return caseDrive;
-}
\ No newline at end of file
