Merge pull request #49 from anklimov/GenericOut

simple analog mapping fix (& binaries)
This commit is contained in:
2019-07-01 18:54:11 +03:00
committed by GitHub
14 changed files with 13605 additions and 13587 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -177,29 +177,29 @@
:100B0000FFF72AFFA3685D8070BD1D702946F6E7D8
:100B10000322E7E72DE9F347064601685F4A60488C
:100B200006F0ABFD337913F0020F0CBF0221002158
:100B30000546707908F034FC707908F03BFB0FFA39
:100B400080F8002D67D02B7C052B64D129465448B2
:100B500006F083FD032850D900222946504806F0AC
:100B600084FD012244694E48294606F07EFD02229A
:100B7000D0F814A04A48294606F077FD4369484852
:100B80000A270322294607FB03F906F06EFD436995
:100B90005F43214600974B465246404608F081F994
:100BA000044629463E4806F058FD05282DD104226A
:100BB00029463B4806F059FDB0F914A03848BC421C
:100BC000A8BF3C464C452946B8BF4C4606F045FDFB
:100BD000022826D100222946314806F046FD436905
:100BE000A3422EDC012229462D4806F03EFD436932
:100BF000A34250DB02B0BDE8F08708EB8804640034
:100C00004FF000094FF42057CBE74FF0010AD5E72A
:100C10000023537021E04FF000094FF420574FF0AC
:100C2000010AB268B2F90230A8EB0303002BB8BF87
:100C30005B425345ECDC92F90130052B0DDC0133AE
:100C4000E7E70024B368B3F90230A34205D0214698
:100C50003046FFF781FEB3685C80B36893F90120EA
:100C6000042A03DD4C4501D0BC42C3D1B3F90230A4
:100C70004345BFD0204609F0A3FE0A4B00220AF0EC
:100C800033F80AF0FFF901463046FFF7D7FDB368A5
:100C9000A3F80280AEE70124D4E700BF48EA0000D1
:100B30000546707908F034FC707908F03BFB07B289
:100B4000002D67D02B7C052B64D12946544806F034
:100B500084FD032853D900222946514806F085FD1B
:100B6000012244694E48294606F07FFD0222D0F852
:100B700014A04B48294606F078FD436948484FF0D9
:100B80000A080322294608FB03F906F06EFD4369B3
:100B900008FB03F82146CDF800804B465246384604
:100BA00008F07FF9044629463D4806F056FD052821
:100BB0002DD1042229463A4806F057FDB0F914A079
:100BC00037484445A8BF44464C452946B8BF4C4623
:100BD00006F043FD022826D100222946304806F0BF
:100BE00044FD4369BB4249DC012229462C4806F0FA
:100BF0003CFD4369BB424EDB02B0BDE8F08707EB2A
:100C0000870464004FF000094FF42058CBE74FF001
:100C1000010AD5E707EB870464004FF000094FF4A1
:100C200020584FF0010AB368B3F902107A1A002A6B
:100C3000B8BF5242524505DC93F90120052A03DC76
:100C4000013200E000225A7093F90130042B03DDD9
:100C50004C4501D04445CFD1B942CDD0204609F012
:100C6000AFFE104B00220AF03FF80AF00BFA0146E3
:100C70003046FFF7E3FDB3685F80BDE70024B3684B
:100C8000B3F90230A342B7D021463046FFF764FEE5
:100C9000B3685C80B0E70124F1E700BF48EA0000D8
:100CA000440500200000244008B50246FFF71EFC62
:100CB00010B94FF0FF3008BD012908D00229FAD140
:100CC0001379042BF7D11046FFF7B0FCF3E7137943
@@ -3868,8 +3868,8 @@
:10F1B0006464726573733A00454550524F4D206345
:10F1C0006C65617265640A000A4C617A79686F6DDA
:10F1D000652E7275204C6967687448756220636F8C
:10F1E0006E74726F6C6C65722000653666386533BC
:10F1F000665F323031392D30362D32370020432BC7
:10F1E0006E74726F6C6C65722000656136376434C2
:10F1F000365F323031392D30362D32370020432BF7
:10F200002B2076657273696F6E3A0032303131307F
:10F21000334C000A282D295741544348444F470096
:10F220000A436F6E666967207365727665723A008D
@@ -3920,7 +3920,7 @@
:10F4F0007200666C6F61740024686F6D696500242A
:10F500006E6F646573007265616479002473746161
:10F510007465002473746174730024666F726D6186
:10F520007400757074696D6500653666386533669C
:10F520007400757074696D650065613637643436D2
:10F530005F323031392D30362D3237004C696768F3
:10F540007448756220004453323438325F313030B1
:10F550005F4932435F544F5F31575F4252494447DE

Binary file not shown.

View File

@@ -486,11 +486,12 @@ void Input::analogPoll() {
if (aJson.getArraySize(inputMap)==2)
{
simple = 1;
if (mappedInputVal < aJson.getArrayItem(inputMap, 0)->valueint) mappedInputVal = 0;
else if (mappedInputVal > aJson.getArrayItem(inputMap, 1)->valueint) mappedInputVal = 1;
if (inputVal < aJson.getArrayItem(inputMap, 0)->valueint) mappedInputVal = 0;
else if (inputVal > aJson.getArrayItem(inputMap, 1)->valueint) mappedInputVal = 1;
else return;
}
}
} else mappedInputVal = inputVal*10; //No mapping arguments
if (simple) {
if (mappedInputVal != store->currentValue)
{
@@ -498,6 +499,7 @@ void Input::analogPoll() {
store->currentValue = mappedInputVal;
}}
else
{
//if (abs(mappedInputVal - store->currentValue)>Noize || mappedInputVal == min || mappedInputVal ==max) // value changed >ANALOG_NOIZE
if (abs(inputVal - store->currentValue)>Noize ) // value changed >ANALOG_NOIZE
store->bounce = 0;
@@ -510,7 +512,7 @@ void Input::analogPoll() {
// store->currentValue = mappedInputVal;
store->currentValue = inputVal;
}
}
}

View File

@@ -85,7 +85,7 @@ int in_hdc1080::Poll()
int reg;
if (!HDC1080ready) {debugSerial<<F("HDC1080 not initialized")<<endl; return 0;}
Serial.print("HDC Status=");
Serial.print(reg=hdc1080.readRegister().rawData,HEX);
Serial.println(reg=hdc1080.readRegister().rawData,HEX);
if (reg!=0xff)
{
Serial.print(" T=");