#pragma once
#ifndef WHILL_GLOBAL_H
#define WHILL_GLOBAL_H

#include <Arduino.h>

#define WHILL_SERIAL_L Serial2
#define WHILL_SERIAL_R Serial3
#define XBEE_SERIAL Serial1

static constexpr uint8_t MY_ID = 0;
static constexpr uint32_t WHILL_SERIAL_BAUD = 38400;
static constexpr uint32_t XBEE_SERIAL_BAUD = 38400;
static constexpr uint16_t WHILL_INFO_INTERVAL_MS = 1000;

static constexpr double XBEE_COMMAND_TIMEOUT_MS = 1000.;

uint8_t HARDWARE_ID = 0xFF;
bool b_need_xbee_init = false;
struct XBeeSettings
{
    uint8_t channel;
    uint16_t pan_id;
    uint32_t dst_addr_h;
    uint32_t dst_addr_l;
    uint8_t packetization_timeout;
};

XBeeSettings xb_settings[6];

#endif // WHILL_GLOBAL_H
