First attept to test DPT13.

This commit is contained in:
2022-03-12 23:06:29 +01:00
parent f9fa0100ba
commit 4ba0246211
2 changed files with 39 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ export class DPT13 implements DPT {
*/
encoder(value: number): Buffer {
if (value === undefined || value === null || Number.isFinite(value))
if (value === undefined || value === null || !Number.isFinite(value))
throw new InvalidValueError(`Value is not viable`)
if (Number.isInteger(value))
throw new InvalidValueError(`Value ${value} is not an integer`)