Skip to content

Commit

Permalink
Merge pull request #36 from core-rocket/flight_parameter
Browse files Browse the repository at this point in the history
パラメータ設定
  • Loading branch information
771-8bit authored Mar 24, 2024
2 parents 6017881 + bbbb417 commit a3a7423
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
9 changes: 3 additions & 6 deletions Main/Main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool need_response_es920 = false;

// Opener
#include "myOpener.h"
MY_OPENER opener(OPENER::SHINSASYO);
MY_OPENER opener(OPENER::FM);

// Valve
char valve_mode = '/';
Expand Down Expand Up @@ -220,15 +220,12 @@ void loop() {

bool new_judge = opener.opener_100Hz(-data_bno_accel_z_mss, data_bme_altitude_m);
downlink += ",";
downlink += data_bno_accel_y_mss;
downlink += data_bno_accel_x_mss;
downlink += ",";
downlink += data_bno_accel_z_mss;
downlink += data_bno_accel_y_mss;
downlink += ",";

downlink += data_bme_pressure_hPa;
downlink += ",";
downlink += data_bme_temperature_degC;
downlink += ",";

Serial_MIF.print(millis());
Serial_MIF.print(",");
Expand Down
4 changes: 2 additions & 2 deletions Main/myOpener.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MY_OPENER : public OPENER {
flight_judgement_duration_ms = ACC_threshold_count * 100;

fm_lift_off_threshold_altitude_m = 1.0;
fm_lift_off_threshold_ac_mss = 25.0;
fm_lift_off_threshold_ac_mss = 20.0;
fm_ALT_oversampling_count = 1;
fm_ALT_threshold_count = ACC_threshold_count;

Expand All @@ -42,7 +42,7 @@ class MY_OPENER : public OPENER {
//! 離床判定後,燃焼中と判断し開放判定を行わない時間[ms]
meco_threshold_time_ms = 5000;
//! 開放機構の動作にかかる時間を引いた,離床から開放までの時間のシム値[ms]の初期値
open_threshold_time_ms = 13000;
open_threshold_time_ms = 12000;

//! パラメータをFMと審査書で切り替える
switch_parameter(setting);
Expand Down
4 changes: 3 additions & 1 deletion MissionInterface/MissionInterface.ino
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void setup() {

pinMode(MISSION_POWER, OUTPUT);
digitalWrite(MISSION_POWER, LOW);

Serial1.setFIFOSize(512);
Serial1.begin(921600);
while (Serial1.available()) {
Expand Down Expand Up @@ -90,6 +90,8 @@ void flash_dump() {
size_t flash_index = 0;
uint32_t flash_addr = 0;

Serial.println("time_ms, state, accel_z_mss, temperature_degC, altitude_m, gnss_latitude_udeg, gnss_longitude_udeg, bat_v, ext_v, accel_x_mss, accel_y_mss, pressure_hPa");

while (true) {
flash.read(flash_addr, flash_buf, 256);
Serial.write(flash_buf, 256);
Expand Down

0 comments on commit a3a7423

Please sign in to comment.