Initial Commit

This commit is contained in:
CarlWachter
2025-03-25 15:20:28 +01:00
commit 81a16b2acc
50 changed files with 5351 additions and 0 deletions

26
App/Inc/tasks/arming.hpp Normal file
View File

@@ -0,0 +1,26 @@
/*
* arming.hpp
*
* Created on: Jun 17, 2024
* Author: carlos
*/
#ifndef INC_TASKS_ARMING_HPP_
#define INC_TASKS_ARMING_HPP_
#include <sta/tacos.hpp>
namespace tasks
{
class ArmingTask : public sta::tacos::TacosThread
{
public:
ArmingTask();
void init() override;
void func() override;
};
} // namespace tasks
#endif /* INC_TASKS_ARMING_HPP_ */

27
App/Inc/tasks/fire.hpp Normal file
View File

@@ -0,0 +1,27 @@
/*
* fire.hpp
*
* Created on: Jun 17, 2024
* Author: carlos
*/
#ifndef INC_TASKS_FIRE_HPP_
#define INC_TASKS_FIRE_HPP_
#include <sta/tacos.hpp>
#include <sta/devices/stm32/can.hpp>
namespace tasks
{
class FireTask : public sta::tacos::TacosThread
{
public:
FireTask();
void init() override;
void func() override;
};
} // namespace tasks
#endif /* INC_TASKS_FIRE_HPP_ */

37
App/Inc/tasks/sense.hpp Normal file
View File

@@ -0,0 +1,37 @@
/*
* sense.hpp
*
* Created on: Jun 17, 2024
* Author: carlos
*/
#ifndef INC_TASKS_SENSE_HPP_
#define INC_TASKS_SENSE_HPP_
#include <sta/tacos.hpp>
#include <sta/devices/stm32/adc.hpp>
#include <sta/devices/stm32/bus/spi.hpp>
namespace tasks
{
class SenseTask : public sta::tacos::TacosThread
{
public:
SenseTask(ADC_HandleTypeDef *handle);
void init() override;
void func() override;
private:
sta::STM32ADC adc_;
uint16_t dmaBuffer_[6];
size_t bufferSize_ = 6;
uint16_t result_[6];
CanSysMsg msg_;
uint16_t result_counter_ = 0;
};
} // namespace tasks
#endif /* INC_TASKS_SENSE_HPP_ */