Better fix for null dereferencing issue. Fix initial Color sensor mode (default).
This commit is contained in:
@ -3,12 +3,13 @@
|
||||
namespace pxsim {
|
||||
|
||||
export enum ColorSensorMode {
|
||||
None = -1,
|
||||
Reflected = 0,
|
||||
Ambient = 1,
|
||||
Colors = 2,
|
||||
RefRaw = 3,
|
||||
RgbRaw = 4,
|
||||
ColorCal = 5
|
||||
ColorCal = 5,
|
||||
}
|
||||
|
||||
export enum ThresholdState {
|
||||
@ -24,6 +25,7 @@ namespace pxsim {
|
||||
|
||||
constructor(port: number) {
|
||||
super(port);
|
||||
this.mode = -1;
|
||||
}
|
||||
|
||||
getDeviceType() {
|
||||
|
Reference in New Issue
Block a user