1
0
mirror of https://gitlab.com/lander-team/lander-cpp.git synced 2025-08-17 02:24:50 +00:00

Added Struct for load cells

This commit is contained in:
Matthew Robinaugh
2021-11-08 15:37:56 -07:00
parent 3eb9369371
commit 541d7f4281
5 changed files with 67 additions and 17 deletions

View File

@@ -1,22 +1,20 @@
#include "Vehicle.h"
#include <Arduino.h>
void thrustInfo(struct Vehicle &);
void processTVC(struct Vehicle &);
void write2CSV(struct outVector &, struct Vehicle &);
void printSimResults(struct Vehicle &);
double loadCellCalibrate();
double loadCellCalibrate(struct LoadCells &);
double loadCellCalibrate() {
double loadCellCalibrate(LoadCells &loadCells) {
// place code to calibrate load cells in here
double loadTotal;
double loadTotal = 0.0;
for (double t = 0; t == 10; ++t) {
loadTotal += 1;
loadTotal += loadCell.read();
delay(15);
}
return loadTotal / 10;
return loadTotal / 10.0;
}
void thrustInfo(Vehicle &State) {