19 lines
426 B
C++
19 lines
426 B
C++
#include "headSystem.hpp"
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
|
|
STONE_STATE HeadSystem::dropSequence() {
|
|
gpio_put(LED1_PIN, 1);
|
|
if(!preLoad()) {
|
|
this->stoneState = EMPTY;
|
|
return this->stoneState;
|
|
}
|
|
|
|
bool prev_head_state = headUp;
|
|
setHeadUp(false);
|
|
STONE_STATE res = dropStone();
|
|
setHeadUp(prev_head_state);
|
|
this->stoneState = res;
|
|
gpio_put(LED2_PIN, 0);
|
|
return res;
|
|
} |