Nueva libreria api wip
Reviewed-on: https://git.fisionx.mooo.com/FisionX/Micromouse/pulls/4 Co-authored-by: fernando <fherpato8@gmail.com> Co-committed-by: fernando <fherpato8@gmail.com>
This commit is contained in:
parent
07895f7cea
commit
7bab5b07e1
31
lib/api/api.cpp
Normal file
31
lib/api/api.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
#include "api.h"
|
||||||
|
#include "mm.hpp"
|
||||||
|
|
||||||
|
/* TO DO
|
||||||
|
* Terminar las funciones wallfront, wallright, wallleft
|
||||||
|
* Definir los pines usados en mm.hpp
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool API::wallFront() {
|
||||||
|
bool wallfront;
|
||||||
|
return wallfront;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool API::wallRight() {
|
||||||
|
bool wallright;
|
||||||
|
return wallright;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool API::wallLeft() {
|
||||||
|
bool wallleft;
|
||||||
|
return wallleft;
|
||||||
|
}
|
||||||
|
|
||||||
|
void API::moveForward(int distance) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void API::turnRight() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void API::turnLeft() {
|
||||||
|
}
|
||||||
15
lib/api/api.h
Normal file
15
lib/api/api.h
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class API {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
static bool wallFront();
|
||||||
|
static bool wallRight();
|
||||||
|
static bool wallLeft();
|
||||||
|
|
||||||
|
static void moveForward(int distance = 1);
|
||||||
|
static void turnRight();
|
||||||
|
static void turnLeft();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "esp32-hal-gpio.h"
|
#include "esp32-hal-gpio.h"
|
||||||
|
#include <api.h>
|
||||||
#include "mm.h" /* Archivos header ubicados en include/ */
|
#include "mm.h" /* Archivos header ubicados en include/ */
|
||||||
|
|
||||||
void m1handler();
|
void m1handler();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user