Skip to content
This repository was archived by the owner on Oct 6, 2020. It is now read-only.

Feature/control individual raw channels #7

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
## Changelog

0.3.0 (10.05.2015)
0.3.1 (29.06.2016)
* fix error when using `/system` endpoint
* fix reconnection issues when AP is not reachable (i.e. after powerloss)
* include latest RGBWWLed Library (0.8.1)
* fix `/color` with `cmd:solid`
* added `from` to `/color` RAW/HSV - fade from a specified color to the desired color

0.3.0 (10.05.2016)
* improved OTA method
* fix `/ping` endpoint
* fix some issues with saving api security state
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
All contributions (PRs) have to be done towards _develop_ branch.
If a feature or bugfix is a major change please contact me to prepare feature specific handling.

__master__: Branch that contains latest production (stable) release. No PRs other than Final Release updates will be merged into __master__.
__master__: Branch that contains latest production (stable) release. No PRs other than firmware releases will be merged into __master__.
__develop__: Main development branch: contains latest features and fixes.

This will mean that __all contributors__ will have to submit a PR to _develop_ , it will be tested and then merged to __develop__ for automated integration testing (via TravisCI), as well as manual testing on a real device.
Expand All @@ -17,4 +17,4 @@ __Project Contributing flow__:
- Work with other contributors to test your feature and get it merged to _develop_

This is the most common approach for a git-flow:
http://nvie.com/posts/a-successful-git-branching-model/
http://nvie.com/posts/a-successful-git-branching-model/
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.3.1
20 changes: 10 additions & 10 deletions app/webserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,11 +763,11 @@ void ApplicationWebserver::onColor(HttpRequest &request, HttpResponse &response)
String cmd = "solid";
bool q = false;

r = constrain(root["raw"]["r"].as<int>(), 0, 1023);
g = constrain(root["raw"]["g"].as<int>(), 0, 1023);
b = constrain(root["raw"]["b"].as<int>(), 0, 1023);
ww = constrain(root["raw"]["ww"].as<int>(), 0, 1023);
cw = constrain(root["raw"]["cw"].as<int>(), 0, 1023);
r = constrain(root["raw"]["r"].as<int>(), -1, 1023);
g = constrain(root["raw"]["g"].as<int>(), -1, 1023);
b = constrain(root["raw"]["b"].as<int>(), -1, 1023);
ww = constrain(root["raw"]["ww"].as<int>(), -1, 1023);
cw = constrain(root["raw"]["cw"].as<int>(), -1, 1023);
if (root["cmd"].success()) {
cmd = root["cmd"].asString();
}
Expand Down Expand Up @@ -804,11 +804,11 @@ void ApplicationWebserver::onColor(HttpRequest &request, HttpResponse &response)
}
int from_r, from_g, from_b, from_ww, from_cw = 0;
ChannelOutput from_output;
from_r = constrain(root["raw"]["r"].as<int>(), 0, 1023);
from_g = constrain(root["raw"]["g"].as<int>(), 0, 1023);
from_b = constrain(root["raw"]["b"].as<int>(), 0, 1023);
from_ww = constrain(root["raw"]["ww"].as<int>(), 0, 1023);
from_cw = constrain(root["raw"]["cw"].as<int>(), 0, 1023);
from_r = constrain(root["raw"]["r"].as<int>(), -1, 1023);
from_g = constrain(root["raw"]["g"].as<int>(), -1, 1023);
from_b = constrain(root["raw"]["b"].as<int>(), -1, 1023);
from_ww = constrain(root["raw"]["ww"].as<int>(), -1, 1023);
from_cw = constrain(root["raw"]["cw"].as<int>(), -1, 1023);

from_output = ChannelOutput(from_r, from_g, from_b, from_ww, from_cw);
debugapp("ApplicationWebserver::onColor raw CMD:%s Q:%d FROM r:%i g:%i b:%i ww:%i cw:%i TO r:%i g:%i b:%i ww:%i cw:%i",
Expand Down
2 changes: 1 addition & 1 deletion include/RGBWWCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#define RGBWW_USE_ESP_HWPWM

// Debugging
#define DEBUG_APP 1
#define DEBUG_APP 0

//includes
#include <user_config.h>
Expand Down