Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add System Variable for day, month and year / Fix for "Calculate" function to recognize minus-sign #485

Merged
merged 4 commits into from Oct 15, 2017

Conversation

Projects
None yet
3 participants
@SightofSilence
Copy link
Contributor

commented Aug 23, 2017

It was not possible to display time and date in a reasonable format on LCD displays.
I have added a few variables so that time and date can be displayed as desired.

Variables:
%syshour%
%sysmin%
%syssec%
%sysday%
%sysmonth%
%sysyear% // 4 digits - 2017
%sysyears% // 2 digits - 17

The formula for changing a sensor value had a problem with negative numbers because the function "Calculate" recognized the "minus sign" as operand and not as a sign for negative numbers.

The function "pop" had a problem with empty stack which leads to undefined return values.

@Grovkillen

This comment has been minimized.

Copy link
Member

commented Aug 23, 2017

Great, I wouldn't mind if you added the following to ( #420 ):

%syshour%
%sysminute%
%syssecond%

@SightofSilence SightofSilence force-pushed the SightofSilence:SightofSilence-patch-1 branch from 8983032 to 9f243c1 Sep 4, 2017

@SightofSilence SightofSilence force-pushed the SightofSilence:SightofSilence-patch-1 branch from 9f243c1 to e61d6ed Sep 14, 2017

@SightofSilence SightofSilence force-pushed the SightofSilence:SightofSilence-patch-1 branch from e61d6ed to 665ddc8 Sep 15, 2017

@psy0rz psy0rz added this to the 2.1.0 milestone Sep 21, 2017

@psy0rz psy0rz merged commit 5c4ae38 into letscontrolit:mega Oct 15, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

TD-er added a commit to TD-er/ESPEasy that referenced this pull request Oct 18, 2017

Add System Variable for day, month and year / Fix for "Calculate" fun…
…ction to recognize minus-sign (letscontrolit#485)

* Add files via upload

* Update Misc.ino

* Add files via upload

TD-er added a commit to TD-er/ESPEasy that referenced this pull request Jan 21, 2018

Central function for system variable replacement
Related to:
- letscontrolit#698 => Not complete
- letscontrolit#709 => fixed
- letscontrolit#751 => fixed

Redesign of PR letscontrolit#485 (in mega branch)

One note: no sensor values can be used in controllers. Is this what we want, or should we call parseTemplate everywhere parseSystemVariables is being used?
Also not all controllers apparently allow system variables. Is this also correct?

psy0rz added a commit that referenced this pull request Jan 22, 2018

Central function for system variable replacement (#757)
* Central function for system variable replacement

Related to:
- #698 => Not complete
- #709 => fixed
- #751 => fixed

Redesign of PR #485 (in mega branch)

One note: no sensor values can be used in controllers. Is this what we want, or should we call parseTemplate everywhere parseSystemVariables is being used?
Also not all controllers apparently allow system variables. Is this also correct?

* [issue 757] Add %lcltime% to display date + time

As requested by @PsychoAndi at PR #757

* [issue 757] Add local time to JSON output

As suggested by @PsychoAndi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.