Skip to content
Snippets Groups Projects
Commit 9dbf7503 authored by Alvise de'Faveri's avatar Alvise de'Faveri
Browse files

[scripts] Ignore gereated files

parent 6374237a
No related branches found
No related tags found
No related merge requests found
......@@ -25,5 +25,5 @@ build
.vscode/*
store.json
scripts/homeone/event_header_generator/generated/
*/generated/
core
/* Copyright (c) 2018-2020 Skyward Experimental Rocketry
* Authors: Luca Erbetta, Alvise de' Faveri Tron
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/*
******************************************************************************
* THIS FILE IS AUTOGENERATED. DO NOT EDIT. *
******************************************************************************
*/
// Autogen date: 2020-03-10 02:43:07.380770
#include "Events.h"
#include "Topics.h"
#include <map>
string getEventString(uint8_t event)
{
static const map<uint8_t, string> event_string_map {
{ EV_ADA_APOGEE_DETECTED, "EV_ADA_APOGEE_DETECTED" },
{ EV_ADA_READY, "EV_ADA_READY" },
{ EV_APOGEE, "EV_APOGEE" },
{ EV_ARMED, "EV_ARMED" },
{ EV_CALIBRATE_ADA, "EV_CALIBRATE_ADA" },
{ EV_DISARMED, "EV_DISARMED" },
{ EV_IMU_READY, "EV_IMU_READY" },
{ EV_INIT_ERROR, "EV_INIT_ERROR" },
{ EV_INIT_OK, "EV_INIT_OK" },
{ EV_LIFTOFF, "EV_LIFTOFF" },
{ EV_NC_BACKUP, "EV_NC_BACKUP" },
{ EV_NC_DETACHED, "EV_NC_DETACHED" },
{ EV_NC_OPEN, "EV_NC_OPEN" },
{ EV_NC_TEST, "EV_NC_TEST" },
{ EV_RESET_SERVO, "EV_RESET_SERVO" },
{ EV_SEND_HR_TM, "EV_SEND_HR_TM" },
{ EV_SEND_LR_TM, "EV_SEND_LR_TM" },
{ EV_SEND_TEST_TM, "EV_SEND_TEST_TM" },
{ EV_STATS_TIMEOUT, "EV_STATS_TIMEOUT" },
{ EV_TC_ARM, "EV_TC_ARM" },
{ EV_TC_CALIBRATE_ADA, "EV_TC_CALIBRATE_ADA" },
{ EV_TC_CALIBRATE_IMU, "EV_TC_CALIBRATE_IMU" },
{ EV_TC_CLOSE_LOG, "EV_TC_CLOSE_LOG" },
{ EV_TC_DISARM, "EV_TC_DISARM" },
{ EV_TC_END_MISSION, "EV_TC_END_MISSION" },
{ EV_TC_FORCE_INIT, "EV_TC_FORCE_INIT" },
{ EV_TC_FORCE_LAUNCH, "EV_TC_FORCE_LAUNCH" },
{ EV_TC_NC_BACKUP, "EV_TC_NC_BACKUP" },
{ EV_TC_NC_OPEN, "EV_TC_NC_OPEN" },
{ EV_TC_RESET, "EV_TC_RESET" },
{ EV_TC_RESET_SERVO, "EV_TC_RESET_SERVO" },
{ EV_TC_TEST_MODE, "EV_TC_TEST_MODE" },
{ EV_TC_WIGGLE_SERVO, "EV_TC_WIGGLE_SERVO" },
{ EV_TIMEOUT_BACKUP, "EV_TIMEOUT_BACKUP" },
{ EV_TIMEOUT_END_MISSION, "EV_TIMEOUT_END_MISSION" },
{ EV_TIMEOUT_NC_OPEN, "EV_TIMEOUT_NC_OPEN" },
{ EV_TIMEOUT_SHADOW_MODE, "EV_TIMEOUT_SHADOW_MODE" },
{ EV_UMBILICAL_DETACHED, "EV_UMBILICAL_DETACHED" },
{ EV_WIGGLE_SERVO, "EV_WIGGLE_SERVO" }
};
auto it = event_string_map.find(event);
return it == event_string_map.end() ? "EV_UNKNOWN" : it->second;
}
string getTopicString(uint8_t topic)
{
static const map<uint8_t, string> topic_string_map{
{ TOPIC_ADA, "TOPIC_ADA" },
{ TOPIC_DPL, "TOPIC_DPL" },
{ TOPIC_FLIGHT, "TOPIC_FLIGHT" },
{ TOPIC_FMM, "TOPIC_FMM" },
{ TOPIC_PINS, "TOPIC_PINS" },
{ TOPIC_STATS, "TOPIC_STATS" },
{ TOPIC_TMTC, "TOPIC_TMTC" }
};
auto it = topic_string_map.find(topic);
return it == topic_string_map.end() ? "TOPIC_UNKNOWN" : it->second;
}
\ No newline at end of file
/* Copyright (c) 2018-2020 Skyward Experimental Rocketry
* Authors: Luca Erbetta, Alvise de' Faveri Tron
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/*
******************************************************************************
* THIS FILE IS AUTOGENERATED. DO NOT EDIT. *
******************************************************************************
*/
// Autogen date: 2020-03-10 02:43:07.380770
#pragma once
#include <cstdint>
#include <string>
#include "events/Event.h"
#include "events/EventBroker.h"
#include "EventClasses.h"
#include "Topics.h"
using std::string;
using std::map;
/**
* Definition of all events in the Homeone Board software
* Refer to section 5.1.1 of the Software Design Document.
*/
enum Events : uint8_t
{
EV_ADA_APOGEE_DETECTED = EV_FIRST_SIGNAL,
EV_ADA_READY,
EV_APOGEE,
EV_ARMED,
EV_CALIBRATE_ADA,
EV_DISARMED,
EV_IMU_READY,
EV_INIT_ERROR,
EV_INIT_OK,
EV_LIFTOFF,
EV_NC_BACKUP,
EV_NC_DETACHED,
EV_NC_OPEN,
EV_NC_TEST,
EV_RESET_SERVO,
EV_SEND_HR_TM,
EV_SEND_LR_TM,
EV_SEND_TEST_TM,
EV_STATS_TIMEOUT,
EV_TC_ARM,
EV_TC_CALIBRATE_ADA,
EV_TC_CALIBRATE_IMU,
EV_TC_CLOSE_LOG,
EV_TC_DISARM,
EV_TC_END_MISSION,
EV_TC_FORCE_INIT,
EV_TC_FORCE_LAUNCH,
EV_TC_NC_BACKUP,
EV_TC_NC_OPEN,
EV_TC_RESET,
EV_TC_RESET_SERVO,
EV_TC_TEST_MODE,
EV_TC_WIGGLE_SERVO,
EV_TIMEOUT_BACKUP,
EV_TIMEOUT_END_MISSION,
EV_TIMEOUT_NC_OPEN,
EV_TIMEOUT_SHADOW_MODE,
EV_UMBILICAL_DETACHED,
EV_WIGGLE_SERVO
};
/**
* @brief Returns the name of the provided event
*
* @param event
* @return string
*/
string getEventString(uint8_t event);
\ No newline at end of file
/* Copyright (c) 2018-2020 Skyward Experimental Rocketry
* Authors: Luca Erbetta, Alvise de' Faveri Tron
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/*
******************************************************************************
* THIS FILE IS AUTOGENERATED. DO NOT EDIT. *
******************************************************************************
*/
// Autogen date: 2020-03-10 02:43:07.380770
#pragma once
#include <stdint.h>
#include <string>
using std::map;
using std::string;
/**
* Definition of various event topics to use in the EventBroker
*/
enum Topics : uint8_t
{
TOPIC_ADA,
TOPIC_DPL,
TOPIC_FLIGHT,
TOPIC_FMM,
TOPIC_PINS,
TOPIC_STATS,
TOPIC_TMTC
};
/**
* @brief Returns the name of the provided event
*
* @param event
* @return string
*/
string getTopicString(uint8_t topic);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment