mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 19:12:10 +01:00
Fix issue #192. Movement continues to my position when finished.
This commit is contained in:
parent
42a4dcb3ff
commit
d97f150439
7 changed files with 12 additions and 12 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef configsettings_h
|
#ifndef configsettings_h
|
||||||
#define configsettings_h
|
#define configsettings_h
|
||||||
|
|
||||||
#define FW_VERSION "v2.2.1"
|
#define FW_VERSION "v2.2.2b"
|
||||||
enum DeviceStatus {
|
enum DeviceStatus {
|
||||||
DS_OK = 0,
|
DS_OK = 0,
|
||||||
DS_ERROR = 1,
|
DS_ERROR = 1,
|
||||||
|
|
|
||||||
10
Somfy.cpp
10
Somfy.cpp
|
|
@ -937,7 +937,7 @@ void SomfyShade::checkMovement() {
|
||||||
bool tilt_first = this->tiltType == tilt_types::integrated && ((this->direction == -1 && this->currentTiltPos != 0.0f) || (this->direction == 1 && this->currentTiltPos != 100.0f));
|
bool tilt_first = this->tiltType == tilt_types::integrated && ((this->direction == -1 && this->currentTiltPos != 0.0f) || (this->direction == 1 && this->currentTiltPos != 100.0f));
|
||||||
|
|
||||||
this->p_tiltDirection(this->currentTiltPos == this->tiltTarget ? 0 : this->currentTiltPos > this->tiltTarget ? -1 : 1);
|
this->p_tiltDirection(this->currentTiltPos == this->tiltTarget ? 0 : this->currentTiltPos > this->tiltTarget ? -1 : 1);
|
||||||
if(tilt_first) { this->p_tiltDirection(this->direction); }
|
if(tilt_first) this->p_tiltDirection(this->direction);
|
||||||
else if(this->direction != 0) this->p_tiltDirection(0);
|
else if(this->direction != 0) this->p_tiltDirection(0);
|
||||||
uint8_t currPos = floor(this->currentPos);
|
uint8_t currPos = floor(this->currentPos);
|
||||||
uint8_t currTiltPos = floor(this->currentTiltPos);
|
uint8_t currTiltPos = floor(this->currentTiltPos);
|
||||||
|
|
@ -1128,11 +1128,11 @@ void SomfyShade::checkMovement() {
|
||||||
if(this->settingTiltPos) {
|
if(this->settingTiltPos) {
|
||||||
if(this->tiltType == tilt_types::integrated) {
|
if(this->tiltType == tilt_types::integrated) {
|
||||||
// If this is an integrated tilt mechanism the we will simply let it finish. If it is not then we will stop it.
|
// If this is an integrated tilt mechanism the we will simply let it finish. If it is not then we will stop it.
|
||||||
if(this->tiltTarget != 100.0 || this->currentPos != 100.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats);
|
if(this->tiltTarget != 100.0f || this->currentTiltPos != 100.0f) SomfyRemote::sendCommand(somfy_commands::My, this->repeats);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// This is a tilt motor so let it complete if it is going to 0.
|
// This is a tilt motor so let it complete if it is going to 100.
|
||||||
if(this->tiltTarget != 100.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats);
|
if(this->tiltTarget != 100.0f) SomfyRemote::sendCommand(somfy_commands::My, this->repeats);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->p_tiltDirection(0);
|
this->p_tiltDirection(0);
|
||||||
|
|
@ -1177,7 +1177,7 @@ void SomfyShade::checkMovement() {
|
||||||
if(this->settingTiltPos) {
|
if(this->settingTiltPos) {
|
||||||
if(this->tiltType == tilt_types::integrated) {
|
if(this->tiltType == tilt_types::integrated) {
|
||||||
// If this is an integrated tilt mechanism the we will simply let it finish. If it is not then we will stop it.
|
// If this is an integrated tilt mechanism the we will simply let it finish. If it is not then we will stop it.
|
||||||
if(this->tiltTarget != 0.0 || this->currentPos != 0.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats);
|
if(this->tiltTarget != 0.0 || this->currentTiltPos != 0.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// This is a tilt motor so let it complete if it is going to 0.
|
// This is a tilt motor so let it complete if it is going to 0.
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
2.2.1
|
2.2.2
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
<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=2.2.1" type="text/css" />
|
<link rel="stylesheet" href="main.css?v=2.2.2b" type="text/css" />
|
||||||
<link rel="stylesheet" href="widgets.css?v=2.2.1" type="text/css" />
|
<link rel="stylesheet" href="widgets.css?v=2.2.2b" type="text/css" />
|
||||||
<link rel="stylesheet" href="icons.css?v=2.2.1" type="text/css" />
|
<link rel="stylesheet" href="icons.css?v=2.2.2b" 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=2.2.1"></script>
|
<script type="text/javascript" src="index.js?v=2.2.2b"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="divContainer" class="container main" data-auth="false">
|
<div id="divContainer" class="container main" data-auth="false">
|
||||||
|
|
|
||||||
|
|
@ -1252,7 +1252,7 @@ var security = new Security();
|
||||||
|
|
||||||
class General {
|
class General {
|
||||||
initialized = false;
|
initialized = false;
|
||||||
appVersion = 'v2.2.1';
|
appVersion = 'v2.2.2b';
|
||||||
reloadApp = false;
|
reloadApp = false;
|
||||||
init() {
|
init() {
|
||||||
if (this.initialized) return;
|
if (this.initialized) return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue