Skip to content

Commit a7f7d8f

Browse files
SpheroのLEDの明るさ調整。
1 parent 8771ebe commit a7f7d8f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

dConnectDevicePlugin/dConnectDeviceSphero/dConnectDeviceSphero/Classes/DPSpheroLightProfile.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
// 点滅

dConnectDevicePlugin/dConnectDeviceSphero/dConnectDeviceSphero/Classes/DPSpheroManager.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)