File tree Expand file tree Collapse file tree
dConnectDevicePlugin/dConnectDeviceSphero/dConnectDeviceSphero/Classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,9 +260,9 @@ -(BOOL) postLightRequest:(DConnectRequestMessage *)request
260260 return YES ;
261261 }
262262
263- ledColor = [UIColor colorWithRed: redValue/255 . green: greenValue/255 . blue: blueValue/255 . alpha: [brightness doubleValue ]];
263+ ledColor = [UIColor colorWithRed: redValue/255 . green: greenValue/255 . blue: blueValue/255 . alpha: [brightness doubleValue ] / 255 . ];
264264 } else {
265- ledColor = [UIColor colorWithRed: 255 . green: 255 . blue: 255 . alpha: [brightness doubleValue ]];
265+ ledColor = [UIColor colorWithRed: 255 . green: 255 . blue: 255 . alpha: [brightness doubleValue ] / 255 . ];
266266 }
267267 if (flashing.count >0 ) {
268268 // 点滅
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ - (void) updateManageServices {
187187 [service setOnline: isOnline];
188188 }
189189 NSString *serviceIdForLED = [NSString stringWithFormat: @" %@ _%@ " , serviceId, kDPSpheroLED ];
190- NSLog ( @" update light name: %@ " , serviceIdForLED);
190+
191191
192192 DConnectService *led = [self .serviceProvider service: serviceIdForLED];
193193 if (led) {
@@ -202,7 +202,7 @@ - (void) updateManageServices {
202202 }
203203 NSString *serviceIdForCalibration = [NSString stringWithFormat: @" %@ _%@ " , serviceId, kDPSpheroCalibration ];
204204 DConnectService *calibration = [self .serviceProvider service: serviceIdForCalibration];
205- NSLog ( @" update light name: %@ " , serviceIdForCalibration);
205+
206206 if (calibration) {
207207 [calibration setOnline: isOnline];
208208 } else {
You can’t perform that action at this time.
0 commit comments