mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-12 18:42:10 +01:00
v1.5.1 Bug Fixes
* Fixed issue where prog command was being filtered out #27 * Added tilt wheel commands for tilt positioning with integrated tilt motors #17 * Added tilt position visibility for Edit Shade screen
This commit is contained in:
parent
1174bed558
commit
39c6e08ca5
7 changed files with 26 additions and 31 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef configsettings_h
|
||||
#define configsettings_h
|
||||
|
||||
#define FW_VERSION "v1.5.0"
|
||||
#define FW_VERSION "v1.5.1"
|
||||
enum DeviceStatus {
|
||||
DS_OK = 0,
|
||||
DS_ERROR = 1,
|
||||
|
|
|
|||
45
Somfy.cpp
45
Somfy.cpp
|
|
@ -1022,43 +1022,38 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
|||
}
|
||||
break;
|
||||
case somfy_commands::StepUp:
|
||||
dir = 0;
|
||||
this->lastFrame.processed = true;
|
||||
// With the step commands and integrated shades
|
||||
// the motor must tilt in the direction first then move
|
||||
// so we have to calculate the target with this in mind.
|
||||
if(this->tiltType == tilt_types::integrated) {
|
||||
// First check to see if the tilt is 0. If it is not then we need to tilt.
|
||||
if(this->currentTiltPos != 0.0f) {
|
||||
this->tiltTarget = max(0.0f, this->currentTiltPos - 0.5f);
|
||||
if(this->currentTiltPos > 0.0f) {
|
||||
this->tiltTarget = max(0.0f, this->currentTiltPos - 1.0f);
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(!internal) {
|
||||
this->lastFrame.await = millis() + 200;
|
||||
}
|
||||
else {
|
||||
this->lastFrame.processed = true;
|
||||
// Simply move the shade up by 1%.
|
||||
if(this->currentPos > 0) {
|
||||
this->target = this->currentPos - 0.5f;
|
||||
dir = -1;
|
||||
else if(this->currentPos > 0.0f) {
|
||||
this->target = max(0.0f, this->currentPos - 1.0f);
|
||||
}
|
||||
}
|
||||
else if(this->currentPos > 0.0f) this->target = max(0.0f, this->currentPos - 1.0f);
|
||||
break;
|
||||
case somfy_commands::StepDown:
|
||||
if(!internal) {
|
||||
this->lastFrame.await = millis() + 200;
|
||||
}
|
||||
else {
|
||||
this->lastFrame.processed = true;
|
||||
// Simply move the shade down by 1%.
|
||||
if(this->currentPos < 100) {
|
||||
this->target = this->currentPos + 0.5f;
|
||||
dir = 1;
|
||||
dir = 1;
|
||||
this->lastFrame.processed = true;
|
||||
// With the step commands and integrated shades
|
||||
// the motor must tilt in the direction first then move
|
||||
// so we have to calculate the target with this in mind.
|
||||
if(this->tiltType == tilt_types::integrated) {
|
||||
// First check to see if the tilt is 0. If it is not then we need to tilt.
|
||||
if(this->currentTiltPos < 100.0f) {
|
||||
this->tiltTarget = min(100.0f, this->currentTiltPos + 1.0f);
|
||||
}
|
||||
else if(this->currentPos > 100.0f) {
|
||||
this->target = min(100.0f, this->currentPos + 1.0f);
|
||||
}
|
||||
}
|
||||
else if(this->currentPos < 100.0f) this->target = min(100.0f, this->currentPos + 1.0f);
|
||||
break;
|
||||
default:
|
||||
dir = 0;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
1.5.0
|
||||
1.5.1
|
||||
|
|
@ -3,10 +3,10 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="main.css?v=1.5.0" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=1.5.0" type="text/css" />
|
||||
<link rel="stylesheet" href="main.css?v=1.5.1" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=1.5.1" type="text/css" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<script type="text/javascript" src="index.js?v=1.5.0"></script>
|
||||
<script type="text/javascript" src="index.js?v=1.5.1"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="divContainer" class="container" style="user-select:none;position:relative;border-radius:27px;">
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ async function reopenSocket() {
|
|||
await initSockets();
|
||||
}
|
||||
class General {
|
||||
appVersion = 'v1.5.0';
|
||||
appVersion = 'v1.5.1';
|
||||
reloadApp = false;
|
||||
async init() {
|
||||
this.setAppVersion();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue