Closed svde closed 3 months ago
Was bringt es wenn ich Raumsoll auch änder?
3 reasons for this PR: 1/ error in current implementation (calculated value is inserted in the high byte.
A few versions ago this was the if statement for 15C:
- lambda: |-
return (id(r_soll).state) == 15;
then:
- canbus.send:
data: [ 0x30, 0x00, 0x05, **0x00, 0x96**, 0x00, 0x00 ]
can_id: 0x680
The current version has:
return { 0x30, 0x00, 0x05, (uint8_t) (x*10), 0x00, 0x00, 0x00 };
where the calculated value is inserted in the high_byte, which is probably incorrect.
2/ standardize the implementation
3/ be able to support a wider temperature range, follow what's stated in the Rotex manual (5 - 40C). Values above 25.5C will require the high_byte to change.
At the moment we have 15C - 25C (which are values that are practical).
15 10 = 150 0x00 0x96 25 10 = 250 0x00 0xFA
5 10 = 50 0x00 0x32 25.5 10 = 255 0x00 0xFF 25.6 10 = 256 0x01 0x00 40 10 = 400 0x01 0x90
3 Gründe für diese PR:1/ Fehler in der aktuellen Implementierung (berechneter Wert wird in das hohe Byte eingefügt.
Vor ein paar Versionen war dies die if-Anweisung für 15C:
- lambda: |- return (id(r_soll).state) == 15; then: - canbus.send: data: [ 0x30, 0x00, 0x05, **0x00, 0x96**, 0x00, 0x00 ] can_id: 0x680
Die aktuelle Version hat:
return { 0x30, 0x00, 0x05, (uint8_t) (x*10), 0x00, 0x00, 0x00 };
wobei der berechnete Wert in das high_byte eingefügt wird, was wahrscheinlich falsch ist.
2/ die Implementierung standardisieren
3/ in der Lage sein, einen breiteren Temperaturbereich zu unterstützen, folgen Sie den Angaben im Rotex-Handbuch (5 - 40C). Werte über 25,5C erfordern, dass sich das high_byte ändert.
Im Moment haben wir 15C - 25C (das sind Werte, die praktisch sind).
15 10 = 150 0x00 0x9625 10 = 250 0x00 0xFA
5 10 = 50 0x00 0x3225,5 10 = 255 0x00 0xFF25.6 10 = 256 0x01 0x0040 10 = 400 0x01 0x90
Gut aufgepasst.Der Fehler ist mir gestern eingeschlichen.Hatte es ganz vergessen es wieder zu ändern.Danke:-)
Thank you!
also use high_byte & low_byte for Raumsoll 1