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-rtos mbed ssWi
car.cpp
00001 #include "car.hpp" 00002 00003 Car::Car ( PinName pinCamX, PinName pinCamY, 00004 PinName pinSteering, PinName pinMotor): 00005 cameraX(pinCamX), cameraY(pinCamY), 00006 steering(pinSteering), motor(pinMotor) 00007 { 00008 angleX = 0; 00009 angleY = 0; 00010 cameraX = 0.0; 00011 cameraY = 0.0; 00012 steering = 0.0; 00013 motor = 0.0; 00014 } 00015 00016 void Car::setSpeed (float s) 00017 { 00018 motor = s; 00019 } 00020 00021 void Car::setSteering (float angle) 00022 { 00023 steering = -angle; 00024 } 00025 00026 void Car::setCamera (float x, float y) 00027 { 00028 cameraX = x; 00029 cameraY = y; 00030 }
Generated on Tue Jul 19 2022 13:36:11 by
1.7.2