mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
refactor: move the shade type enums into ShadeTypes.h
group_types, shade_types and tilt_types move out of Somfy.h unchanged into a header without the shade model, so the shade maths in ShadeMotion and the sun and wind rules can use tilt_types in the native tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c8d774be7d
commit
0eb0e63631
2 changed files with 38 additions and 29 deletions
37
src/ShadeTypes.h
Normal file
37
src/ShadeTypes.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#ifndef SHADE_TYPES_H
|
||||
#define SHADE_TYPES_H
|
||||
#include <Arduino.h>
|
||||
|
||||
// The kinds of shade, tilt and group. Kept free of the shade model so the
|
||||
// shade maths can use them in the unit tests on the PC (pio test -e native).
|
||||
|
||||
enum class group_types : byte {
|
||||
channel = 0x00
|
||||
};
|
||||
enum class shade_types : byte {
|
||||
roller = 0x00,
|
||||
blind = 0x01,
|
||||
ldrapery = 0x02,
|
||||
awning = 0x03,
|
||||
shutter = 0x04,
|
||||
garage1 = 0x05,
|
||||
garage3 = 0x06,
|
||||
rdrapery = 0x07,
|
||||
cdrapery = 0x08,
|
||||
drycontact = 0x09,
|
||||
drycontact2 = 0x0A,
|
||||
lgate = 0x0B,
|
||||
cgate = 0x0C,
|
||||
rgate = 0x0D,
|
||||
lgate1 = 0x0E,
|
||||
cgate1 = 0x0F,
|
||||
rgate1 = 0x10
|
||||
};
|
||||
enum class tilt_types : byte {
|
||||
none = 0x00,
|
||||
tiltmotor = 0x01,
|
||||
integrated = 0x02,
|
||||
tiltonly = 0x03,
|
||||
euromode = 0x04
|
||||
};
|
||||
#endif
|
||||
30
src/Somfy.h
30
src/Somfy.h
|
|
@ -25,37 +25,9 @@
|
|||
#include "SomfyFrame.h"
|
||||
#include "TxBuffer.h"
|
||||
#include "RadioScheduler.h"
|
||||
#include "ShadeTypes.h"
|
||||
#include "ShadeMotion.h"
|
||||
#include "Transceiver.h"
|
||||
enum class group_types : byte {
|
||||
channel = 0x00
|
||||
};
|
||||
enum class shade_types : byte {
|
||||
roller = 0x00,
|
||||
blind = 0x01,
|
||||
ldrapery = 0x02,
|
||||
awning = 0x03,
|
||||
shutter = 0x04,
|
||||
garage1 = 0x05,
|
||||
garage3 = 0x06,
|
||||
rdrapery = 0x07,
|
||||
cdrapery = 0x08,
|
||||
drycontact = 0x09,
|
||||
drycontact2 = 0x0A,
|
||||
lgate = 0x0B,
|
||||
cgate = 0x0C,
|
||||
rgate = 0x0D,
|
||||
lgate1 = 0x0E,
|
||||
cgate1 = 0x0F,
|
||||
rgate1 = 0x10
|
||||
};
|
||||
enum class tilt_types : byte {
|
||||
none = 0x00,
|
||||
tiltmotor = 0x01,
|
||||
integrated = 0x02,
|
||||
tiltonly = 0x03,
|
||||
euromode = 0x04
|
||||
};
|
||||
|
||||
enum class somfy_flags_t : byte {
|
||||
SunFlag = 0x01,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue