Browse Source

Turn all lights off when exiting app

Thomas Buck 8 years ago
parent
commit
a96e065efd
2 changed files with 3 additions and 2 deletions
  1. 2
    1
      CaseLights/AppDelegate.m
  2. 1
    1
      CaseLights/Info.plist

+ 2
- 1
CaseLights/AppDelegate.m View File

238
 }
238
 }
239
 
239
 
240
 - (void)applicationWillTerminate:(NSNotification *)aNotification {
240
 - (void)applicationWillTerminate:(NSNotification *)aNotification {
241
-    // Close serial port, if it was opened
242
     if ([serial isOpen]) {
241
     if ([serial isOpen]) {
242
+        [serial sendString:@"RGB 0 0 0\n"];
243
+        [serial sendString:@"UV 0\n"];
243
         [serial closePort];
244
         [serial closePort];
244
     }
245
     }
245
 }
246
 }

+ 1
- 1
CaseLights/Info.plist View File

21
 	<key>CFBundleSignature</key>
21
 	<key>CFBundleSignature</key>
22
 	<string>????</string>
22
 	<string>????</string>
23
 	<key>CFBundleVersion</key>
23
 	<key>CFBundleVersion</key>
24
-	<string>115</string>
24
+	<string>117</string>
25
 	<key>LSApplicationCategoryType</key>
25
 	<key>LSApplicationCategoryType</key>
26
 	<string>public.app-category.utilities</string>
26
 	<string>public.app-category.utilities</string>
27
 	<key>LSMinimumSystemVersion</key>
27
 	<key>LSMinimumSystemVersion</key>

Loading…
Cancel
Save