2014-04-13 11:54:25 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
2014-04-13 17:42:57 +02:00
|
|
|
* @file notification.c
|
2014-04-13 11:54:25 +02:00
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014.
|
2014-04-13 17:42:57 +02:00
|
|
|
* @brief notification library.
|
2014-04-13 11:54:25 +02:00
|
|
|
* --
|
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
2014-04-13 17:42:57 +02:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2014-04-13 11:54:25 +02:00
|
|
|
* (at your option) any later version.
|
2014-04-13 17:42:57 +02:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
2014-04-13 11:54:25 +02:00
|
|
|
* for more details.
|
2014-04-13 17:42:57 +02:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
2014-04-13 11:54:25 +02:00
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
#include "inc/notification.h"
|
|
|
|
#include <openpilot.h>
|
|
|
|
#include <pios_struct_helper.h>
|
|
|
|
#include <systemalarms.h>
|
|
|
|
#include <flightstatus.h>
|
2014-04-13 17:42:57 +02:00
|
|
|
#include <pios_notify.h>
|
2014-04-13 11:54:25 +02:00
|
|
|
|
|
|
|
#ifdef PIOS_LED_ALARM
|
|
|
|
#define ALARM_LED_ON() PIOS_LED_On(PIOS_LED_ALARM)
|
|
|
|
#define ALARM_LED_OFF() PIOS_LED_Off(PIOS_LED_ALARM)
|
|
|
|
#else
|
|
|
|
#define ALARM_LED_ON()
|
|
|
|
#define ALARM_LED_OFF()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef PIOS_LED_HEARTBEAT
|
|
|
|
#define HEARTBEAT_LED_ON() PIOS_LED_On(PIOS_LED_HEARTBEAT)
|
|
|
|
#define HEARTBEAT_LED_OFF() PIOS_LED_Off(PIOS_LED_HEARTBEAT)
|
|
|
|
#else
|
|
|
|
#define HEARTBEAT_LED_ON()
|
|
|
|
#define HEARTBEAT_LED_OFF()
|
|
|
|
#endif
|
|
|
|
|
2014-04-16 07:57:15 +02:00
|
|
|
#define BLINK_R_ALARM_PATTERN(x) \
|
2014-04-13 11:54:25 +02:00
|
|
|
(x == SYSTEMALARMS_ALARM_OK ? 0 : \
|
2014-04-16 07:57:15 +02:00
|
|
|
x == SYSTEMALARMS_ALARM_WARNING ? 0b0000000001000000 : \
|
|
|
|
x == SYSTEMALARMS_ALARM_ERROR ? 0b0000001000100000 : \
|
|
|
|
x == SYSTEMALARMS_ALARM_CRITICAL ? 0b0111111111111110 : 0)
|
|
|
|
#define BLINK_B_ALARM_PATTERN(x) \
|
|
|
|
(x == SYSTEMALARMS_ALARM_OK ? 0 : \
|
|
|
|
x == SYSTEMALARMS_ALARM_WARNING ? 0 : \
|
|
|
|
x == SYSTEMALARMS_ALARM_ERROR ? 0 : \
|
2014-04-13 11:54:25 +02:00
|
|
|
x == SYSTEMALARMS_ALARM_CRITICAL ? 0 : 0)
|
|
|
|
|
|
|
|
|
2014-04-16 07:57:15 +02:00
|
|
|
#define BLINK_B_FM_ARMED_PATTERN(x) \
|
|
|
|
(x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED1 ? 0b0000000000000001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED2 ? 0b0000000000100001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED3 ? 0b0000010000100001 : \
|
2014-05-08 22:26:12 +02:00
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED4 ? 0b0000000000000001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED5 ? 0b0000000000100001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED6 ? 0b0000010000100001 : \
|
2014-04-16 07:57:15 +02:00
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POSITIONHOLD ? 0b0000010000100001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_RETURNTOBASE ? 0b0001000100010001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_LAND ? 0b0001000100010001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_PATHPLANNER ? 0b0000010000100001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POI ? 0b0000010000100001 : 0b0000000000000001)
|
|
|
|
|
|
|
|
#define BLINK_R_FM_ARMED_PATTERN(x) \
|
|
|
|
(x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED1 ? 0b0000000000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED2 ? 0b0000000000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED3 ? 0b0000000000000000 : \
|
2014-05-08 22:26:12 +02:00
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED4 ? 0b0000000000000001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED5 ? 0b0000000000000001 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED6 ? 0b0000000000000001 : \
|
2014-04-16 07:57:15 +02:00
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POSITIONHOLD ? 0b0000010000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_RETURNTOBASE ? 0b0001000100000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_LAND ? 0b0001000100000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_PATHPLANNER ? 0b0000010000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POI ? 0b0000010000000000 : 0b0000010000000000)
|
|
|
|
|
|
|
|
#define BLINK_B_FM_DISARMED_PATTERN(x) \
|
2014-05-08 22:26:12 +02:00
|
|
|
(x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED1 ? 0b0000000000000011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED2 ? 0b0000000001100011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED3 ? 0b0000110001100011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED4 ? 0b0000000000000011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED5 ? 0b0000000001100011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED6 ? 0b0000110001100011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POSITIONHOLD ? 0b0000110001100011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_RETURNTOBASE ? 0b0011001100110011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_LAND ? 0b0011001100110011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_PATHPLANNER ? 0b0000110001100011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POI ? 0b0000110001100011 : 0b0000000000000011)
|
2014-04-16 07:57:15 +02:00
|
|
|
|
|
|
|
#define BLINK_R_FM_DISARMED_PATTERN(x) \
|
2014-05-08 22:26:12 +02:00
|
|
|
(x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED1 ? 0b0000000000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED2 ? 0b0000000000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED3 ? 0b0000000000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED4 ? 0b0000000000000011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED5 ? 0b0000000000000011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_STABILIZED6 ? 0b0000000000000011 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POSITIONHOLD ? 0b0000110000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_RETURNTOBASE ? 0b0011001100000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_LAND ? 0b0011001100000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_PATHPLANNER ? 0b0000110000000000 : \
|
|
|
|
x == FLIGHTSTATUS_FLIGHTMODE_POI ? 0b0000110000000000 : 0b0000110000000000)
|
2014-04-16 07:57:15 +02:00
|
|
|
|
2014-05-08 22:26:12 +02:00
|
|
|
#define BLINK_B_HEARTBEAT_PATTERN 0b0001111111111111
|
|
|
|
#define BLINK_R_HEARTBEAT_PATTERN 0
|
2014-04-13 11:54:25 +02:00
|
|
|
|
2014-04-16 07:57:15 +02:00
|
|
|
#define BLINK_B_NOTIFY_PATTERN(x) \
|
|
|
|
(x == NOTIFY_NONE ? 0 : \
|
|
|
|
x == NOTIFY_OK ? 0b0000100100111111 : \
|
|
|
|
x == NOTIFY_NOK ? 0b0000000000111111 : \
|
|
|
|
x == NOTIFY_DRAW_ATTENTION ? 0b0101010101010101 : 0b0101010101010101)
|
|
|
|
|
|
|
|
#define BLINK_R_NOTIFY_PATTERN(x) \
|
|
|
|
(x == NOTIFY_NONE ? 0 : \
|
|
|
|
x == NOTIFY_OK ? 0b0000000000001111 : \
|
|
|
|
x == NOTIFY_NOK ? 0b0011000011001111 : \
|
|
|
|
x == NOTIFY_DRAW_ATTENTION ? 0b1010101010101010 : 0b1010101010101010)
|
2014-04-13 11:54:25 +02:00
|
|
|
|
|
|
|
// led notification handling
|
|
|
|
static volatile SystemAlarmsAlarmOptions currentAlarmLevel = SYSTEMALARMS_ALARM_OK;
|
|
|
|
static volatile FlightStatusData currentFlightStatus;
|
|
|
|
static volatile bool started = false;
|
2014-04-13 17:42:57 +02:00
|
|
|
static volatile pios_notify_notification nextNotification = NOTIFY_NONE;
|
2014-04-13 11:54:25 +02:00
|
|
|
|
2014-04-13 17:42:57 +02:00
|
|
|
#ifdef PIOS_LED_ALARM
|
2014-04-16 07:57:15 +02:00
|
|
|
static bool handleAlarms(uint16_t *r_pattern, uint16_t *b_pattern);
|
2014-04-13 17:42:57 +02:00
|
|
|
#endif // PIOS_LED_ALARM
|
2014-04-16 07:57:15 +02:00
|
|
|
static bool handleNotifications(pios_notify_notification runningNotification, uint16_t *r_pattern, uint16_t *b_pattern);
|
2014-05-08 22:26:12 +02:00
|
|
|
static void handleFlightMode(uint16_t *r_pattern, uint16_t *b_pattern);
|
|
|
|
static void handleHeartbeat(uint16_t *r_pattern, uint16_t *b_pattern);
|
2014-04-13 17:42:57 +02:00
|
|
|
void NotificationUpdateStatus()
|
|
|
|
{
|
2014-04-13 11:54:25 +02:00
|
|
|
started = true;
|
|
|
|
// get values to be used for led handling
|
|
|
|
FlightStatusGet((FlightStatusData *)¤tFlightStatus);
|
|
|
|
currentAlarmLevel = AlarmsGetHighestSeverity();
|
2014-04-13 17:42:57 +02:00
|
|
|
if (nextNotification == NOTIFY_NONE) {
|
|
|
|
nextNotification = PIOS_NOTIFY_GetActiveNotification(true);
|
|
|
|
}
|
2014-04-13 11:54:25 +02:00
|
|
|
}
|
|
|
|
|
2014-04-13 17:42:57 +02:00
|
|
|
void NotificationOnboardLedsRun()
|
|
|
|
{
|
2014-04-13 11:54:25 +02:00
|
|
|
static portTickType lastRunTimestamp;
|
2014-04-16 07:57:15 +02:00
|
|
|
static uint16_t r_pattern;
|
|
|
|
static uint16_t b_pattern;
|
|
|
|
static uint8_t cycleCount; // count the number of cycles
|
2014-05-08 22:26:12 +02:00
|
|
|
static uint8_t lastFlightMode = -1;
|
|
|
|
static bool forceShowFlightMode = false;
|
2014-04-13 17:42:57 +02:00
|
|
|
static pios_notify_notification runningNotification = NOTIFY_NONE;
|
|
|
|
static enum {
|
|
|
|
STATUS_NOTIFY,
|
|
|
|
STATUS_ALARM,
|
2014-05-08 22:26:12 +02:00
|
|
|
STATUS_FLIGHTMODE, // flightMode/HeartBeat
|
2014-04-13 17:42:57 +02:00
|
|
|
STATUS_LENGHT
|
|
|
|
} status;
|
|
|
|
|
2014-04-16 07:57:15 +02:00
|
|
|
if (!started || (xTaskGetTickCount() - lastRunTimestamp) < (LED_BLINK_PERIOD_MS * portTICK_RATE_MS / 4)) {
|
2014-04-13 11:54:25 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-04-13 17:42:57 +02:00
|
|
|
|
2014-04-13 11:54:25 +02:00
|
|
|
lastRunTimestamp = xTaskGetTickCount();
|
|
|
|
// the led will show various status information, subdivided in three phases
|
|
|
|
// - Notification
|
|
|
|
// - Alarm
|
|
|
|
// - Flight status
|
|
|
|
// they are shown using the above priority
|
|
|
|
// a phase last exactly 8 cycles (so bit 1<<4 is used to determine if a phase end
|
|
|
|
|
|
|
|
cycleCount++;
|
2014-04-13 17:42:57 +02:00
|
|
|
// Notifications are "modal" to other statuses so they takes precedence
|
|
|
|
if (status != STATUS_NOTIFY && nextNotification != NOTIFY_NONE) {
|
2014-04-13 17:56:20 +02:00
|
|
|
// read next notification to show
|
2014-04-13 17:42:57 +02:00
|
|
|
runningNotification = nextNotification;
|
|
|
|
nextNotification = NOTIFY_NONE;
|
2014-04-13 17:56:20 +02:00
|
|
|
// Force a notification status
|
2014-04-13 17:42:57 +02:00
|
|
|
status = STATUS_NOTIFY;
|
|
|
|
cycleCount = 0; // instantly start a notify cycle
|
2014-05-08 22:26:12 +02:00
|
|
|
} else {
|
|
|
|
if (lastFlightMode != currentFlightStatus.FlightMode) {
|
|
|
|
status = STATUS_FLIGHTMODE;
|
|
|
|
lastFlightMode = currentFlightStatus.FlightMode;
|
|
|
|
cycleCount = 0; // instantly start a flightMode cycle
|
|
|
|
forceShowFlightMode = true;
|
|
|
|
}
|
2014-04-13 17:42:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// check if a phase has just finished
|
2014-04-16 07:57:15 +02:00
|
|
|
if (cycleCount & 0x10) {
|
|
|
|
HEARTBEAT_LED_OFF();
|
|
|
|
ALARM_LED_OFF();
|
|
|
|
cycleCount = 0x0;
|
2014-05-08 22:26:12 +02:00
|
|
|
forceShowFlightMode = false;
|
2014-04-16 07:57:15 +02:00
|
|
|
// Notification has been just shown, cleanup
|
|
|
|
if (status == STATUS_NOTIFY) {
|
|
|
|
runningNotification = NOTIFY_NONE;
|
2014-04-13 11:54:25 +02:00
|
|
|
}
|
2014-04-16 07:57:15 +02:00
|
|
|
status = (status + 1) % STATUS_LENGHT;
|
2014-04-13 11:54:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (status == STATUS_NOTIFY) {
|
2014-04-16 07:57:15 +02:00
|
|
|
if (!cycleCount && !handleNotifications(runningNotification, &r_pattern, &b_pattern)) {
|
2014-04-13 17:56:20 +02:00
|
|
|
// no notifications, advance
|
2014-04-13 17:42:57 +02:00
|
|
|
status++;
|
|
|
|
}
|
2014-04-13 11:54:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Handles Alarm display
|
|
|
|
if (status == STATUS_ALARM) {
|
2014-04-13 17:42:57 +02:00
|
|
|
#ifdef PIOS_LED_ALARM
|
2014-04-16 07:57:15 +02:00
|
|
|
if (!cycleCount && !handleAlarms(&r_pattern, &b_pattern)) {
|
2014-04-13 17:56:20 +02:00
|
|
|
// no alarms, advance
|
2014-04-13 11:54:25 +02:00
|
|
|
status++;
|
|
|
|
}
|
2014-04-13 17:42:57 +02:00
|
|
|
#else
|
2014-04-13 17:56:20 +02:00
|
|
|
// no alarms leds, advance
|
2014-04-13 11:54:25 +02:00
|
|
|
status++;
|
2014-04-13 17:42:57 +02:00
|
|
|
#endif // PIOS_LED_ALARM
|
2014-04-13 11:54:25 +02:00
|
|
|
}
|
2014-04-13 17:56:20 +02:00
|
|
|
|
2014-04-13 11:54:25 +02:00
|
|
|
// **** Handles flightmode display
|
2014-04-16 07:57:15 +02:00
|
|
|
if (status == STATUS_FLIGHTMODE && !cycleCount) {
|
2014-05-08 22:26:12 +02:00
|
|
|
if (forceShowFlightMode || currentFlightStatus.Armed != FLIGHTSTATUS_ARMED_DISARMED) {
|
|
|
|
handleFlightMode(&r_pattern, &b_pattern);
|
|
|
|
} else {
|
|
|
|
handleHeartbeat(&r_pattern, &b_pattern);
|
|
|
|
}
|
2014-04-16 07:57:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// led output
|
|
|
|
if (b_pattern & 0x1) {
|
|
|
|
HEARTBEAT_LED_ON();
|
|
|
|
} else {
|
|
|
|
HEARTBEAT_LED_OFF();
|
|
|
|
}
|
|
|
|
if (r_pattern & 0x1) {
|
|
|
|
ALARM_LED_ON();
|
|
|
|
} else {
|
|
|
|
ALARM_LED_OFF();
|
2014-04-13 17:42:57 +02:00
|
|
|
}
|
2014-04-16 07:57:15 +02:00
|
|
|
r_pattern >>= 1;
|
|
|
|
b_pattern >>= 1;
|
2014-04-13 17:42:57 +02:00
|
|
|
}
|
2014-04-13 11:54:25 +02:00
|
|
|
|
2014-04-13 17:42:57 +02:00
|
|
|
#if defined(PIOS_LED_ALARM)
|
2014-04-16 07:57:15 +02:00
|
|
|
static bool handleAlarms(uint16_t *r_pattern, uint16_t *b_pattern)
|
2014-04-13 17:42:57 +02:00
|
|
|
{
|
2014-04-13 17:56:20 +02:00
|
|
|
if (currentAlarmLevel == SYSTEMALARMS_ALARM_OK) {
|
|
|
|
return false;
|
|
|
|
}
|
2014-04-16 07:57:15 +02:00
|
|
|
*b_pattern = BLINK_B_ALARM_PATTERN(currentAlarmLevel);
|
|
|
|
*r_pattern = BLINK_R_ALARM_PATTERN(currentAlarmLevel);
|
2014-04-13 17:56:20 +02:00
|
|
|
return true;
|
2014-04-13 17:42:57 +02:00
|
|
|
}
|
|
|
|
#endif /* PIOS_LED_ALARM */
|
|
|
|
|
|
|
|
|
2014-04-16 07:57:15 +02:00
|
|
|
static bool handleNotifications(pios_notify_notification runningNotification, uint16_t *r_pattern, uint16_t *b_pattern)
|
2014-04-13 17:42:57 +02:00
|
|
|
{
|
|
|
|
if (runningNotification == NOTIFY_NONE) {
|
|
|
|
return false;
|
|
|
|
}
|
2014-04-16 07:57:15 +02:00
|
|
|
*b_pattern = BLINK_B_NOTIFY_PATTERN(runningNotification);
|
|
|
|
*r_pattern = BLINK_R_NOTIFY_PATTERN(runningNotification);
|
2014-04-13 17:42:57 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-05-08 22:26:12 +02:00
|
|
|
static void handleFlightMode(uint16_t *r_pattern, uint16_t *b_pattern)
|
2014-04-13 17:42:57 +02:00
|
|
|
{
|
|
|
|
// Flash the heartbeat LED
|
|
|
|
uint8_t flightmode = currentFlightStatus.FlightMode;
|
2014-04-16 07:57:15 +02:00
|
|
|
|
2014-04-13 17:42:57 +02:00
|
|
|
if (currentFlightStatus.Armed == FLIGHTSTATUS_ARMED_DISARMED) {
|
2014-04-16 07:57:15 +02:00
|
|
|
*b_pattern = BLINK_B_FM_DISARMED_PATTERN(flightmode);
|
|
|
|
*r_pattern = BLINK_R_FM_DISARMED_PATTERN(flightmode);
|
2014-04-13 17:42:57 +02:00
|
|
|
} else {
|
2014-04-16 07:57:15 +02:00
|
|
|
*b_pattern = BLINK_B_FM_ARMED_PATTERN(flightmode);
|
|
|
|
*r_pattern = BLINK_R_FM_ARMED_PATTERN(flightmode);
|
2014-04-13 11:54:25 +02:00
|
|
|
}
|
|
|
|
}
|
2014-05-08 22:26:12 +02:00
|
|
|
|
|
|
|
static void handleHeartbeat(uint16_t *r_pattern, uint16_t *b_pattern)
|
|
|
|
{
|
|
|
|
// Flash the heartbeat LED
|
|
|
|
*b_pattern = BLINK_B_HEARTBEAT_PATTERN;
|
|
|
|
*r_pattern = BLINK_R_HEARTBEAT_PATTERN;
|
|
|
|
}
|