mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 19:12: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
|
#ifndef configsettings_h
|
||||||
#define configsettings_h
|
#define configsettings_h
|
||||||
|
|
||||||
#define FW_VERSION "v1.5.0"
|
#define FW_VERSION "v1.5.1"
|
||||||
enum DeviceStatus {
|
enum DeviceStatus {
|
||||||
DS_OK = 0,
|
DS_OK = 0,
|
||||||
DS_ERROR = 1,
|
DS_ERROR = 1,
|
||||||
|
|
|
||||||
45
Somfy.cpp
45
Somfy.cpp
|
|
@ -1022,43 +1022,38 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case somfy_commands::StepUp:
|
case somfy_commands::StepUp:
|
||||||
|
dir = 0;
|
||||||
|
this->lastFrame.processed = true;
|
||||||
// With the step commands and integrated shades
|
// With the step commands and integrated shades
|
||||||
// the motor must tilt in the direction first then move
|
// the motor must tilt in the direction first then move
|
||||||
// so we have to calculate the target with this in mind.
|
// so we have to calculate the target with this in mind.
|
||||||
if(this->tiltType == tilt_types::integrated) {
|
if(this->tiltType == tilt_types::integrated) {
|
||||||
// First check to see if the tilt is 0. If it is not then we need to tilt.
|
// First check to see if the tilt is 0. If it is not then we need to tilt.
|
||||||
if(this->currentTiltPos != 0.0f) {
|
if(this->currentTiltPos > 0.0f) {
|
||||||
this->tiltTarget = max(0.0f, this->currentTiltPos - 0.5f);
|
this->tiltTarget = max(0.0f, this->currentTiltPos - 1.0f);
|
||||||
}
|
}
|
||||||
else {
|
else if(this->currentPos > 0.0f) {
|
||||||
|
this->target = max(0.0f, this->currentPos - 1.0f);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
||||||
break;
|
break;
|
||||||
case somfy_commands::StepDown:
|
case somfy_commands::StepDown:
|
||||||
if(!internal) {
|
dir = 1;
|
||||||
this->lastFrame.await = millis() + 200;
|
this->lastFrame.processed = true;
|
||||||
}
|
// With the step commands and integrated shades
|
||||||
else {
|
// the motor must tilt in the direction first then move
|
||||||
this->lastFrame.processed = true;
|
// so we have to calculate the target with this in mind.
|
||||||
// Simply move the shade down by 1%.
|
if(this->tiltType == tilt_types::integrated) {
|
||||||
if(this->currentPos < 100) {
|
// First check to see if the tilt is 0. If it is not then we need to tilt.
|
||||||
this->target = this->currentPos + 0.5f;
|
if(this->currentTiltPos < 100.0f) {
|
||||||
dir = 1;
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
dir = 0;
|
dir = 0;
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
1.5.0
|
1.5.1
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="main.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.0" 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" />
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="divContainer" class="container" style="user-select:none;position:relative;border-radius:27px;">
|
<div id="divContainer" class="container" style="user-select:none;position:relative;border-radius:27px;">
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ async function reopenSocket() {
|
||||||
await initSockets();
|
await initSockets();
|
||||||
}
|
}
|
||||||
class General {
|
class General {
|
||||||
appVersion = 'v1.5.0';
|
appVersion = 'v1.5.1';
|
||||||
reloadApp = false;
|
reloadApp = false;
|
||||||
async init() {
|
async init() {
|
||||||
this.setAppVersion();
|
this.setAppVersion();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue