You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
645 B
C
36 lines
645 B
C
![]()
2 years ago
|
// RodeLightCommand.h
|
||
|
|
||
|
#ifndef _RODELIGHTCOMMAND_h
|
||
|
#define _RODELIGHTCOMMAND_h
|
||
|
|
||
|
#if defined(ARDUINO) && ARDUINO >= 100
|
||
|
#include "arduino.h"
|
||
|
#else
|
||
|
#include "WProgram.h"
|
||
|
#endif
|
||
|
|
||
|
#include <BH1750.h>
|
||
|
#include <Infrare.h>
|
||
|
#include "GlobalDatas.h"
|
||
|
|
||
|
class RodeLightCommand
|
||
|
{
|
||
|
private:
|
||
|
byte ir_cmd[4];
|
||
|
private:
|
||
|
static void Swap(uint16_t& a, uint16_t& b);
|
||
|
static byte CalcLevel(uint16_t* sorted_arr, uint16_t curr);
|
||
|
public:
|
||
|
RodeLightCommand();
|
||
|
public:
|
||
|
byte* CMD_LightPlusOne();
|
||
|
byte* CMD_LightPlusTwo();
|
||
|
byte* CMD_LightPlusThree();
|
||
|
public:
|
||
|
static byte GetCurrentLevel();
|
||
|
static void SetToSpeclevel(byte target_lv, byte current_lv);
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
|