From a16df73876a393c44d2dfbf6035e8c8c7e283914 Mon Sep 17 00:00:00 2001 From: Gab_S Date: Sat, 25 Jan 2020 18:47:06 +0000 Subject: [PATCH] Delete 'Mapping/Arduino/tankdrive.h' --- Mapping/Arduino/tankdrive.h | 66 ------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 Mapping/Arduino/tankdrive.h diff --git a/Mapping/Arduino/tankdrive.h b/Mapping/Arduino/tankdrive.h deleted file mode 100644 index 45485b3..0000000 --- a/Mapping/Arduino/tankdrive.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef _TANKDRIVE_H // not #ifnotdef -#define _TANKDRIVE_H - -#include "Motorz.h" - -class TankDrive -{ - Motorz *motorL; - Motorz *motorR; - int forwardR,forwardL,backR,backL; - public: - TankDrive(Motorz *MR,int fr,Motorz *ML,int fl){ - motorL=ML; - motorR=MR; - forwardR=fr; - forwardL=fl; - if(fr==1)backR=0; - else backR=1; - if(fl==1)backL=0; - else backL=1; - } - void MoveForward(){ - motorR->SetDirection(forwardR); - motorL->SetDirection(forwardL); - motorR->Start(); - motorL->Start(); - } - void MoveBack(){ - motorR->SetDirection(backR); - motorL->SetDirection(backL); - motorR->Start(); - motorL->Start(); - } - void Stop(){ - - motorR->Stop(); - motorL->Stop(); - } - void TurnRight(){ - motorR->SetDirection(backR); - motorL->SetDirection(forwardL); - motorR->Start(); - motorL->Start(); - } - void TurnLeft(){ - motorR->SetDirection(forwardR); - motorL->SetDirection(backL); - motorL->Start(); - motorR->Start(); - } - int getFDirR(){ - return forwardR; - } - int getFDirL(){ - return forwardL; - } - int getBDirR(){ - return backR; - } - int getBDirL(){ - return backL; - } -}; - - -#endif _TANKDRIVE_H