WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
LedBlinker.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX INC 2025. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, INC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, INC.
15******************************************************************************/
16/*
17LED Blinker header file
18
19Author: Alex Reynolds
20*/
21#ifndef APPS_LED_BLINKER_H
22#define APPS_LED_BLINKER_H
23
24#include "flight/App.h"
26
29
30namespace warpos {
31
38 class LedBlinker : public App {
39 public:
42 SIGNAL(frequency, uint8, 1)
44 SIGNAL(bank, uint8, 0)
46 SIGNAL(pin, uint32, 0)
48
51 SIGNAL(status, bool, 0)
53 SIGNAL(blink_count, uint32, 0)
55
56 LedBlinker(FlightExecutive &executive);
57
58 virtual ~LedBlinker() {};
59
62 int16 activate() override;
63
66 int16 deactivate() override;
67
73 int16 command(uint16 apid, uint8* buffer, uint16 size) override;
74 protected:
75 int16 start() override;
76 int16 execute() override;
77
79 uint8 _freq = 0;
80
82 uint8 _count = 0;
83
86 };
87}
88
89#endif
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition appmacros.h:27
#define START_PARAMS
Definition appmacros.h:42
#define END_OUTPUTS
Definition appmacros.h:33
#define END_PARAMS
Definition appmacros.h:47
#define START_OUTPUTS
Definition appmacros.h:28
App(FlightExecutive &executive, const char *name, uint16 apid, uint8 instance=0)
Executive-based constructor for the task.
Definition App.cpp:21
uint16 apid()
Get the apid for this app.
Definition App.h:105
Executive derivation specifically to run flight systems.
Definition FlightExecutive.h:46
int16 deactivate() override
Deactivate the app. The app will not step when deactivated.
Definition LedBlinker.cpp:74
int16 execute() override
Definition LedBlinker.cpp:42
int16 activate() override
Activate the app. The app will step when active.
Definition LedBlinker.cpp:68
uint8 _count
The current LED blinker counter which resets when frequency achieved.
Definition LedBlinker.h:82
int16 command(uint16 apid, uint8 *buffer, uint16 size) override
Process commands issued to the app.
Definition LedBlinker.cpp:86
LedBlinker(FlightExecutive &executive)
Definition LedBlinker.cpp:20
int16 start() override
Definition LedBlinker.cpp:31
tlm_led_blinker_count _tlm_count
Packet to hold LED blink count.
Definition LedBlinker.h:85
uint8 _freq
The frequency at which the LED blinker should blink.
Definition LedBlinker.h:79
Definition DeadReckon.cpp:20
LED Blinker count packet definition.
Definition tlm_LedBlinker.h:41
clockwerk::DataIO< uint32 > blink_count
Definition LedBlinker.h:53
clockwerk::DataIO< bool > status
Definition LedBlinker.h:51
clockwerk::DataIO< uint8 > bank
Definition LedBlinker.h:44
clockwerk::DataIO< uint8 > frequency
Definition LedBlinker.h:42
clockwerk::DataIO< uint32 > pin
Definition LedBlinker.h:46