#pragma once
#include "BaseProcess.h"
#include "GComPort.h"
#include "RingBuffer.h"
class BitalMonitor : public BaseProcess
{
const int COM_PORT = 4;
const char LF = 10;
GComPort _Com;
RingBuffer<int> _rrInterval;
bool _useDevice;
public:
BitalMonitor(ECTrainer* pEct);
bool Init();
bool MainLoop();
bool IsUseDevice() { return _useDevice; }
int GetRR() { return _rrInterval.Get(); }
int GetHB() { return _rrInterval.Get() < 1 ? 0 : 60000 / _rrInterval.Get(); }
};