From 67a7a7c9c820297317d88592fc3a0110e8302a0d Mon Sep 17 00:00:00 2001 From: Gab_S Date: Wed, 15 Jan 2020 11:47:22 +0000 Subject: [PATCH] Delete 'Mapping/tankdrive.h' --- Mapping/tankdrive.h | 66 --------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 Mapping/tankdrive.h diff --git a/Mapping/tankdrive.h b/Mapping/tankdrive.h deleted file mode 100644 index 45485b3..0000000 --- a/Mapping/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