Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ir.h
- Committer:
- rzalog
- Date:
- 2019-05-05
- Revision:
- 0:7a97ebb833eb
File content as of revision 0:7a97ebb833eb:
#pragma once
#include "mbed.h"
const float MIDR = 0.0f; // TODO
const float MIDL = 0.0f; // TODO
// IR Stuff
const int WARM_UP_US = 60;
const int COOL_DOWN_US = 60;
class IR {
public:
IR();
void update() volatile;
float RF() volatile { return m_rf; };
float LF() volatile { return m_lf; };
float RS() volatile { return m_rs; };
float LS() volatile { return m_ls; };
float RS_error() volatile;
float LS_error() volatile;
void printValues() volatile;
private:
float flash_ir(DigitalOut ir, AnalogIn rec) volatile;
float read_ir(AnalogIn rec) volatile;
float m_rf;
float m_lf;
float m_rs;
float m_ls;
float init_rf;
float init_lf;
};