Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ -(BOOL) postLightRequest:(DConnectRequestMessage *)request
[response setErrorToInvalidRequestParameterWithMessage:@"invalid brightness value."];
return YES;
}

if (!brightness) {
brightness = @(1.0);
}
if ([lightId isEqualToString:kDPSpheroCalibration]) {
// キャリブレーションライト点灯。 colorは変えられない。点灯、消灯のみ
if (flashing.count > 0) {
Expand Down Expand Up @@ -260,9 +262,9 @@ -(BOOL) postLightRequest:(DConnectRequestMessage *)request
return YES;
}

ledColor = [UIColor colorWithRed:redValue/255. green:greenValue/255. blue:blueValue/255. alpha:[brightness doubleValue] / 255.];
ledColor = [UIColor colorWithRed:redValue/255. green:greenValue/255. blue:blueValue/255. alpha:[brightness doubleValue]];
} else {
ledColor = [UIColor colorWithRed:255. green:255. blue:255. alpha:[brightness doubleValue] / 255.];
ledColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:[brightness doubleValue]];
}
if (flashing.count>0) {
// 点滅
Expand Down