Merge pull request #207 from nojronatron/155-bugfix-adc-mult-override
change validation type to IsNumber
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import type { Message } from "@bufbuild/protobuf";
|
import type { Message } from "@bufbuild/protobuf";
|
||||||
import type { Protobuf } from "@meshtastic/js";
|
import type { Protobuf } from "@meshtastic/js";
|
||||||
import { IsBoolean, IsInt, Max, Min } from "class-validator";
|
import { IsBoolean, IsInt, IsNumber, Max, Min } from "class-validator";
|
||||||
|
|
||||||
export class PowerValidation
|
export class PowerValidation
|
||||||
implements Omit<Protobuf.Config.Config_PowerConfig, keyof Message>
|
implements Omit<Protobuf.Config.Config_PowerConfig, keyof Message>
|
||||||
@@ -11,7 +11,7 @@ export class PowerValidation
|
|||||||
@IsInt()
|
@IsInt()
|
||||||
onBatteryShutdownAfterSecs: number;
|
onBatteryShutdownAfterSecs: number;
|
||||||
|
|
||||||
@IsInt()
|
@IsNumber()
|
||||||
@Min(2)
|
@Min(2)
|
||||||
@Max(4)
|
@Max(4)
|
||||||
adcMultiplierOverride: number;
|
adcMultiplierOverride: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user