├── ClevoKBFanControl.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── deanu.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── deanu.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── ClevoKBFanControl ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon_128x128.png │ │ ├── Icon_128x128@2x.png │ │ ├── Icon_16x16.png │ │ ├── Icon_16x16@2x.png │ │ ├── Icon_256x256.png │ │ ├── Icon_256x256@2x.png │ │ ├── Icon_32x32.png │ │ ├── Icon_32x32@2x.png │ │ ├── Icon_512x512.png │ │ └── Icon_512x512@2x.png ├── Base.lproj │ └── Main.storyboard ├── ClevoCtrlWrapper.cpp ├── ClevoKBFanControl-Bridging-Header.h ├── ClevoKBFanControl.entitlements ├── Info.plist └── ViewController.swift ├── ClevoKBFanControlTests ├── ClevoKBFanControlTests.swift └── Info.plist ├── ClevoKBFanControlUITests ├── ClevoKBFanControlUITests.swift └── Info.plist ├── README.md ├── Src ├── ClevoControl.a ├── ClevoControl.cpp ├── ClevoControl.o └── ECCtrl.h └── img └── demo.png /ClevoKBFanControl.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 44AD5199213ACF61006D8346 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44AD5198213ACF61006D8346 /* AppDelegate.swift */; }; 11 | 44AD519B213ACF61006D8346 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44AD519A213ACF61006D8346 /* ViewController.swift */; }; 12 | 44AD519D213ACF61006D8346 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 44AD519C213ACF61006D8346 /* Assets.xcassets */; }; 13 | 44AD51A0213ACF61006D8346 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 44AD519E213ACF61006D8346 /* Main.storyboard */; }; 14 | 44AD51AC213ACF61006D8346 /* ClevoKBFanControlTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44AD51AB213ACF61006D8346 /* ClevoKBFanControlTests.swift */; }; 15 | 44AD51B7213ACF61006D8346 /* ClevoKBFanControlUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44AD51B6213ACF61006D8346 /* ClevoKBFanControlUITests.swift */; }; 16 | 44BB8334213BC7EE0009CBAB /* ClevoControl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 44BB8333213BC7EE0009CBAB /* ClevoControl.a */; }; 17 | 44BB8338213BC82D0009CBAB /* ClevoCtrlWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 44BB8337213BC82D0009CBAB /* ClevoCtrlWrapper.cpp */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 44AD51A8213ACF61006D8346 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 44AD518D213ACF61006D8346 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 44AD5194213ACF61006D8346; 26 | remoteInfo = ClevoKBFanControl; 27 | }; 28 | 44AD51B3213ACF61006D8346 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 44AD518D213ACF61006D8346 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 44AD5194213ACF61006D8346; 33 | remoteInfo = ClevoKBFanControl; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 44AD5195213ACF61006D8346 /* ClevoKBFanControl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ClevoKBFanControl.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 44AD5198213ACF61006D8346 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 44AD519A213ACF61006D8346 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 41 | 44AD519C213ACF61006D8346 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 42 | 44AD519F213ACF61006D8346 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 43 | 44AD51A1213ACF61006D8346 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 44AD51A2213ACF61006D8346 /* ClevoKBFanControl.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ClevoKBFanControl.entitlements; sourceTree = ""; }; 45 | 44AD51A7213ACF61006D8346 /* ClevoKBFanControlTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ClevoKBFanControlTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 44AD51AB213ACF61006D8346 /* ClevoKBFanControlTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClevoKBFanControlTests.swift; sourceTree = ""; }; 47 | 44AD51AD213ACF61006D8346 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 44AD51B2213ACF61006D8346 /* ClevoKBFanControlUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ClevoKBFanControlUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 44AD51B6213ACF61006D8346 /* ClevoKBFanControlUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClevoKBFanControlUITests.swift; sourceTree = ""; }; 50 | 44AD51B8213ACF61006D8346 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 44BB8333213BC7EE0009CBAB /* ClevoControl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = ClevoControl.a; path = Src/ClevoControl.a; sourceTree = ""; }; 52 | 44BB8335213BC7FD0009CBAB /* ECCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECCtrl.h; path = Src/ECCtrl.h; sourceTree = SOURCE_ROOT; }; 53 | 44BB8336213BC82C0009CBAB /* ClevoKBFanControl-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ClevoKBFanControl-Bridging-Header.h"; sourceTree = ""; }; 54 | 44BB8337213BC82D0009CBAB /* ClevoCtrlWrapper.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ClevoCtrlWrapper.cpp; sourceTree = ""; }; 55 | /* End PBXFileReference section */ 56 | 57 | /* Begin PBXFrameworksBuildPhase section */ 58 | 44AD5192213ACF61006D8346 /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 44BB8334213BC7EE0009CBAB /* ClevoControl.a in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | 44AD51A4213ACF61006D8346 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 44AD51AF213ACF61006D8346 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | 44AD518C213ACF61006D8346 = { 84 | isa = PBXGroup; 85 | children = ( 86 | 44AD5197213ACF61006D8346 /* ClevoKBFanControl */, 87 | 44AD51AA213ACF61006D8346 /* ClevoKBFanControlTests */, 88 | 44AD51B5213ACF61006D8346 /* ClevoKBFanControlUITests */, 89 | 44AD5196213ACF61006D8346 /* Products */, 90 | 44BB8332213BC7ED0009CBAB /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 44AD5196213ACF61006D8346 /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 44AD5195213ACF61006D8346 /* ClevoKBFanControl.app */, 98 | 44AD51A7213ACF61006D8346 /* ClevoKBFanControlTests.xctest */, 99 | 44AD51B2213ACF61006D8346 /* ClevoKBFanControlUITests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | 44AD5197213ACF61006D8346 /* ClevoKBFanControl */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 44BB8335213BC7FD0009CBAB /* ECCtrl.h */, 108 | 44AD5198213ACF61006D8346 /* AppDelegate.swift */, 109 | 44AD519A213ACF61006D8346 /* ViewController.swift */, 110 | 44AD519C213ACF61006D8346 /* Assets.xcassets */, 111 | 44AD519E213ACF61006D8346 /* Main.storyboard */, 112 | 44AD51A1213ACF61006D8346 /* Info.plist */, 113 | 44AD51A2213ACF61006D8346 /* ClevoKBFanControl.entitlements */, 114 | 44BB8337213BC82D0009CBAB /* ClevoCtrlWrapper.cpp */, 115 | 44BB8336213BC82C0009CBAB /* ClevoKBFanControl-Bridging-Header.h */, 116 | ); 117 | path = ClevoKBFanControl; 118 | sourceTree = ""; 119 | }; 120 | 44AD51AA213ACF61006D8346 /* ClevoKBFanControlTests */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 44AD51AB213ACF61006D8346 /* ClevoKBFanControlTests.swift */, 124 | 44AD51AD213ACF61006D8346 /* Info.plist */, 125 | ); 126 | path = ClevoKBFanControlTests; 127 | sourceTree = ""; 128 | }; 129 | 44AD51B5213ACF61006D8346 /* ClevoKBFanControlUITests */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 44AD51B6213ACF61006D8346 /* ClevoKBFanControlUITests.swift */, 133 | 44AD51B8213ACF61006D8346 /* Info.plist */, 134 | ); 135 | path = ClevoKBFanControlUITests; 136 | sourceTree = ""; 137 | }; 138 | 44BB8332213BC7ED0009CBAB /* Frameworks */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 44BB8333213BC7EE0009CBAB /* ClevoControl.a */, 142 | ); 143 | name = Frameworks; 144 | sourceTree = ""; 145 | }; 146 | /* End PBXGroup section */ 147 | 148 | /* Begin PBXNativeTarget section */ 149 | 44AD5194213ACF61006D8346 /* ClevoKBFanControl */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = 44AD51BB213ACF61006D8346 /* Build configuration list for PBXNativeTarget "ClevoKBFanControl" */; 152 | buildPhases = ( 153 | 44AD5191213ACF61006D8346 /* Sources */, 154 | 44AD5192213ACF61006D8346 /* Frameworks */, 155 | 44AD5193213ACF61006D8346 /* Resources */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | ); 161 | name = ClevoKBFanControl; 162 | productName = ClevoKBFanControl; 163 | productReference = 44AD5195213ACF61006D8346 /* ClevoKBFanControl.app */; 164 | productType = "com.apple.product-type.application"; 165 | }; 166 | 44AD51A6213ACF61006D8346 /* ClevoKBFanControlTests */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = 44AD51BE213ACF61006D8346 /* Build configuration list for PBXNativeTarget "ClevoKBFanControlTests" */; 169 | buildPhases = ( 170 | 44AD51A3213ACF61006D8346 /* Sources */, 171 | 44AD51A4213ACF61006D8346 /* Frameworks */, 172 | 44AD51A5213ACF61006D8346 /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | 44AD51A9213ACF61006D8346 /* PBXTargetDependency */, 178 | ); 179 | name = ClevoKBFanControlTests; 180 | productName = ClevoKBFanControlTests; 181 | productReference = 44AD51A7213ACF61006D8346 /* ClevoKBFanControlTests.xctest */; 182 | productType = "com.apple.product-type.bundle.unit-test"; 183 | }; 184 | 44AD51B1213ACF61006D8346 /* ClevoKBFanControlUITests */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = 44AD51C1213ACF61006D8346 /* Build configuration list for PBXNativeTarget "ClevoKBFanControlUITests" */; 187 | buildPhases = ( 188 | 44AD51AE213ACF61006D8346 /* Sources */, 189 | 44AD51AF213ACF61006D8346 /* Frameworks */, 190 | 44AD51B0213ACF61006D8346 /* Resources */, 191 | ); 192 | buildRules = ( 193 | ); 194 | dependencies = ( 195 | 44AD51B4213ACF61006D8346 /* PBXTargetDependency */, 196 | ); 197 | name = ClevoKBFanControlUITests; 198 | productName = ClevoKBFanControlUITests; 199 | productReference = 44AD51B2213ACF61006D8346 /* ClevoKBFanControlUITests.xctest */; 200 | productType = "com.apple.product-type.bundle.ui-testing"; 201 | }; 202 | /* End PBXNativeTarget section */ 203 | 204 | /* Begin PBXProject section */ 205 | 44AD518D213ACF61006D8346 /* Project object */ = { 206 | isa = PBXProject; 207 | attributes = { 208 | LastSwiftUpdateCheck = 0920; 209 | LastUpgradeCheck = 0920; 210 | ORGANIZATIONNAME = deanu; 211 | TargetAttributes = { 212 | 44AD5194213ACF61006D8346 = { 213 | CreatedOnToolsVersion = 9.2; 214 | LastSwiftMigration = 0920; 215 | ProvisioningStyle = Automatic; 216 | SystemCapabilities = { 217 | com.apple.Sandbox = { 218 | enabled = 0; 219 | }; 220 | }; 221 | }; 222 | 44AD51A6213ACF61006D8346 = { 223 | CreatedOnToolsVersion = 9.2; 224 | ProvisioningStyle = Automatic; 225 | TestTargetID = 44AD5194213ACF61006D8346; 226 | }; 227 | 44AD51B1213ACF61006D8346 = { 228 | CreatedOnToolsVersion = 9.2; 229 | ProvisioningStyle = Automatic; 230 | TestTargetID = 44AD5194213ACF61006D8346; 231 | }; 232 | }; 233 | }; 234 | buildConfigurationList = 44AD5190213ACF61006D8346 /* Build configuration list for PBXProject "ClevoKBFanControl" */; 235 | compatibilityVersion = "Xcode 8.0"; 236 | developmentRegion = en; 237 | hasScannedForEncodings = 0; 238 | knownRegions = ( 239 | en, 240 | Base, 241 | ); 242 | mainGroup = 44AD518C213ACF61006D8346; 243 | productRefGroup = 44AD5196213ACF61006D8346 /* Products */; 244 | projectDirPath = ""; 245 | projectRoot = ""; 246 | targets = ( 247 | 44AD5194213ACF61006D8346 /* ClevoKBFanControl */, 248 | 44AD51A6213ACF61006D8346 /* ClevoKBFanControlTests */, 249 | 44AD51B1213ACF61006D8346 /* ClevoKBFanControlUITests */, 250 | ); 251 | }; 252 | /* End PBXProject section */ 253 | 254 | /* Begin PBXResourcesBuildPhase section */ 255 | 44AD5193213ACF61006D8346 /* Resources */ = { 256 | isa = PBXResourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | 44AD519D213ACF61006D8346 /* Assets.xcassets in Resources */, 260 | 44AD51A0213ACF61006D8346 /* Main.storyboard in Resources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | 44AD51A5213ACF61006D8346 /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | 44AD51B0213ACF61006D8346 /* Resources */ = { 272 | isa = PBXResourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | /* End PBXResourcesBuildPhase section */ 279 | 280 | /* Begin PBXSourcesBuildPhase section */ 281 | 44AD5191213ACF61006D8346 /* Sources */ = { 282 | isa = PBXSourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | 44AD519B213ACF61006D8346 /* ViewController.swift in Sources */, 286 | 44AD5199213ACF61006D8346 /* AppDelegate.swift in Sources */, 287 | 44BB8338213BC82D0009CBAB /* ClevoCtrlWrapper.cpp in Sources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | 44AD51A3213ACF61006D8346 /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 44AD51AC213ACF61006D8346 /* ClevoKBFanControlTests.swift in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | 44AD51AE213ACF61006D8346 /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | 44AD51B7213ACF61006D8346 /* ClevoKBFanControlUITests.swift in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | /* End PBXSourcesBuildPhase section */ 308 | 309 | /* Begin PBXTargetDependency section */ 310 | 44AD51A9213ACF61006D8346 /* PBXTargetDependency */ = { 311 | isa = PBXTargetDependency; 312 | target = 44AD5194213ACF61006D8346 /* ClevoKBFanControl */; 313 | targetProxy = 44AD51A8213ACF61006D8346 /* PBXContainerItemProxy */; 314 | }; 315 | 44AD51B4213ACF61006D8346 /* PBXTargetDependency */ = { 316 | isa = PBXTargetDependency; 317 | target = 44AD5194213ACF61006D8346 /* ClevoKBFanControl */; 318 | targetProxy = 44AD51B3213ACF61006D8346 /* PBXContainerItemProxy */; 319 | }; 320 | /* End PBXTargetDependency section */ 321 | 322 | /* Begin PBXVariantGroup section */ 323 | 44AD519E213ACF61006D8346 /* Main.storyboard */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | 44AD519F213ACF61006D8346 /* Base */, 327 | ); 328 | name = Main.storyboard; 329 | sourceTree = ""; 330 | }; 331 | /* End PBXVariantGroup section */ 332 | 333 | /* Begin XCBuildConfiguration section */ 334 | 44AD51B9213ACF61006D8346 /* Debug */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ALWAYS_SEARCH_USER_PATHS = NO; 338 | CLANG_ANALYZER_NONNULL = YES; 339 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 345 | CLANG_WARN_BOOL_CONVERSION = YES; 346 | CLANG_WARN_COMMA = YES; 347 | CLANG_WARN_CONSTANT_CONVERSION = YES; 348 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 349 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 350 | CLANG_WARN_EMPTY_BODY = YES; 351 | CLANG_WARN_ENUM_CONVERSION = YES; 352 | CLANG_WARN_INFINITE_RECURSION = YES; 353 | CLANG_WARN_INT_CONVERSION = YES; 354 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 356 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 357 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 358 | CLANG_WARN_STRICT_PROTOTYPES = YES; 359 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 360 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | CODE_SIGN_IDENTITY = "-"; 364 | COPY_PHASE_STRIP = NO; 365 | DEBUG_INFORMATION_FORMAT = dwarf; 366 | ENABLE_NS_ASSERTIONS = NO; 367 | ENABLE_STRICT_OBJC_MSGSEND = NO; 368 | ENABLE_TESTABILITY = YES; 369 | GCC_C_LANGUAGE_STANDARD = gnu11; 370 | GCC_DYNAMIC_NO_PIC = NO; 371 | GCC_NO_COMMON_BLOCKS = YES; 372 | GCC_OPTIMIZATION_LEVEL = 0; 373 | GCC_PREPROCESSOR_DEFINITIONS = ( 374 | "DEBUG=0", 375 | "$(inherited)", 376 | ); 377 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 378 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 379 | GCC_WARN_UNDECLARED_SELECTOR = YES; 380 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 381 | GCC_WARN_UNUSED_FUNCTION = YES; 382 | GCC_WARN_UNUSED_VARIABLE = YES; 383 | MACOSX_DEPLOYMENT_TARGET = 10.13; 384 | MTL_ENABLE_DEBUG_INFO = YES; 385 | ONLY_ACTIVE_ARCH = NO; 386 | SDKROOT = macosx; 387 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 388 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 389 | }; 390 | name = Debug; 391 | }; 392 | 44AD51BA213ACF61006D8346 /* Release */ = { 393 | isa = XCBuildConfiguration; 394 | buildSettings = { 395 | ALWAYS_SEARCH_USER_PATHS = NO; 396 | CLANG_ANALYZER_NONNULL = YES; 397 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 398 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 399 | CLANG_CXX_LIBRARY = "libc++"; 400 | CLANG_ENABLE_MODULES = YES; 401 | CLANG_ENABLE_OBJC_ARC = YES; 402 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 403 | CLANG_WARN_BOOL_CONVERSION = YES; 404 | CLANG_WARN_COMMA = YES; 405 | CLANG_WARN_CONSTANT_CONVERSION = YES; 406 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 407 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 408 | CLANG_WARN_EMPTY_BODY = YES; 409 | CLANG_WARN_ENUM_CONVERSION = YES; 410 | CLANG_WARN_INFINITE_RECURSION = YES; 411 | CLANG_WARN_INT_CONVERSION = YES; 412 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 413 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 414 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 415 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 416 | CLANG_WARN_STRICT_PROTOTYPES = YES; 417 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 418 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 419 | CLANG_WARN_UNREACHABLE_CODE = YES; 420 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 421 | CODE_SIGN_IDENTITY = "-"; 422 | COPY_PHASE_STRIP = NO; 423 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 424 | ENABLE_NS_ASSERTIONS = YES; 425 | ENABLE_STRICT_OBJC_MSGSEND = YES; 426 | GCC_C_LANGUAGE_STANDARD = gnu11; 427 | GCC_NO_COMMON_BLOCKS = YES; 428 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 429 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 430 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 431 | GCC_WARN_UNDECLARED_SELECTOR = YES; 432 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 433 | GCC_WARN_UNUSED_FUNCTION = YES; 434 | GCC_WARN_UNUSED_VARIABLE = YES; 435 | MACOSX_DEPLOYMENT_TARGET = 10.13; 436 | MTL_ENABLE_DEBUG_INFO = NO; 437 | ONLY_ACTIVE_ARCH = YES; 438 | SDKROOT = macosx; 439 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 440 | }; 441 | name = Release; 442 | }; 443 | 44AD51BC213ACF61006D8346 /* Debug */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 447 | CLANG_ENABLE_MODULES = YES; 448 | CODE_SIGN_IDENTITY = "Mac Developer"; 449 | CODE_SIGN_STYLE = Automatic; 450 | COMBINE_HIDPI_IMAGES = YES; 451 | DEVELOPMENT_TEAM = LX2S4XPKS3; 452 | FRAMEWORK_SEARCH_PATHS = ( 453 | "$(inherited)", 454 | "$(PROJECT_DIR)/ClevoKBFanControl", 455 | ); 456 | INFOPLIST_FILE = ClevoKBFanControl/Info.plist; 457 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 458 | LIBRARY_SEARCH_PATHS = ( 459 | "$(inherited)", 460 | "$(PROJECT_DIR)/Src", 461 | ); 462 | PRODUCT_BUNDLE_IDENTIFIER = deanu.ClevoKBFanControl; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | PROVISIONING_PROFILE_SPECIFIER = ""; 465 | SWIFT_OBJC_BRIDGING_HEADER = "ClevoKBFanControl/ClevoKBFanControl-Bridging-Header.h"; 466 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 467 | SWIFT_VERSION = 4.0; 468 | }; 469 | name = Debug; 470 | }; 471 | 44AD51BD213ACF61006D8346 /* Release */ = { 472 | isa = XCBuildConfiguration; 473 | buildSettings = { 474 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 475 | CLANG_ENABLE_MODULES = YES; 476 | CODE_SIGN_IDENTITY = "Mac Developer"; 477 | CODE_SIGN_STYLE = Automatic; 478 | COMBINE_HIDPI_IMAGES = YES; 479 | DEVELOPMENT_TEAM = LX2S4XPKS3; 480 | FRAMEWORK_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/ClevoKBFanControl", 483 | ); 484 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 485 | INFOPLIST_FILE = ClevoKBFanControl/Info.plist; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 487 | LIBRARY_SEARCH_PATHS = ( 488 | "$(inherited)", 489 | "$(PROJECT_DIR)/Src", 490 | ); 491 | PRODUCT_BUNDLE_IDENTIFIER = deanu.ClevoKBFanControl; 492 | PRODUCT_NAME = "$(TARGET_NAME)"; 493 | PROVISIONING_PROFILE_SPECIFIER = ""; 494 | SWIFT_OBJC_BRIDGING_HEADER = "ClevoKBFanControl/ClevoKBFanControl-Bridging-Header.h"; 495 | SWIFT_VERSION = 4.0; 496 | }; 497 | name = Release; 498 | }; 499 | 44AD51BF213ACF61006D8346 /* Debug */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 503 | BUNDLE_LOADER = "$(TEST_HOST)"; 504 | CODE_SIGN_STYLE = Automatic; 505 | COMBINE_HIDPI_IMAGES = YES; 506 | INFOPLIST_FILE = ClevoKBFanControlTests/Info.plist; 507 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 508 | PRODUCT_BUNDLE_IDENTIFIER = deanu.ClevoKBFanControlTests; 509 | PRODUCT_NAME = "$(TARGET_NAME)"; 510 | SWIFT_VERSION = 4.0; 511 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ClevoKBFanControl.app/Contents/MacOS/ClevoKBFanControl"; 512 | }; 513 | name = Debug; 514 | }; 515 | 44AD51C0213ACF61006D8346 /* Release */ = { 516 | isa = XCBuildConfiguration; 517 | buildSettings = { 518 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 519 | BUNDLE_LOADER = "$(TEST_HOST)"; 520 | CODE_SIGN_STYLE = Automatic; 521 | COMBINE_HIDPI_IMAGES = YES; 522 | INFOPLIST_FILE = ClevoKBFanControlTests/Info.plist; 523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 524 | PRODUCT_BUNDLE_IDENTIFIER = deanu.ClevoKBFanControlTests; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | SWIFT_VERSION = 4.0; 527 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ClevoKBFanControl.app/Contents/MacOS/ClevoKBFanControl"; 528 | }; 529 | name = Release; 530 | }; 531 | 44AD51C2213ACF61006D8346 /* Debug */ = { 532 | isa = XCBuildConfiguration; 533 | buildSettings = { 534 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 535 | CODE_SIGN_STYLE = Automatic; 536 | COMBINE_HIDPI_IMAGES = YES; 537 | INFOPLIST_FILE = ClevoKBFanControlUITests/Info.plist; 538 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 539 | PRODUCT_BUNDLE_IDENTIFIER = deanu.ClevoKBFanControlUITests; 540 | PRODUCT_NAME = "$(TARGET_NAME)"; 541 | SWIFT_VERSION = 4.0; 542 | TEST_TARGET_NAME = ClevoKBFanControl; 543 | }; 544 | name = Debug; 545 | }; 546 | 44AD51C3213ACF61006D8346 /* Release */ = { 547 | isa = XCBuildConfiguration; 548 | buildSettings = { 549 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 550 | CODE_SIGN_STYLE = Automatic; 551 | COMBINE_HIDPI_IMAGES = YES; 552 | INFOPLIST_FILE = ClevoKBFanControlUITests/Info.plist; 553 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 554 | PRODUCT_BUNDLE_IDENTIFIER = deanu.ClevoKBFanControlUITests; 555 | PRODUCT_NAME = "$(TARGET_NAME)"; 556 | SWIFT_VERSION = 4.0; 557 | TEST_TARGET_NAME = ClevoKBFanControl; 558 | }; 559 | name = Release; 560 | }; 561 | /* End XCBuildConfiguration section */ 562 | 563 | /* Begin XCConfigurationList section */ 564 | 44AD5190213ACF61006D8346 /* Build configuration list for PBXProject "ClevoKBFanControl" */ = { 565 | isa = XCConfigurationList; 566 | buildConfigurations = ( 567 | 44AD51B9213ACF61006D8346 /* Debug */, 568 | 44AD51BA213ACF61006D8346 /* Release */, 569 | ); 570 | defaultConfigurationIsVisible = 0; 571 | defaultConfigurationName = Release; 572 | }; 573 | 44AD51BB213ACF61006D8346 /* Build configuration list for PBXNativeTarget "ClevoKBFanControl" */ = { 574 | isa = XCConfigurationList; 575 | buildConfigurations = ( 576 | 44AD51BC213ACF61006D8346 /* Debug */, 577 | 44AD51BD213ACF61006D8346 /* Release */, 578 | ); 579 | defaultConfigurationIsVisible = 0; 580 | defaultConfigurationName = Release; 581 | }; 582 | 44AD51BE213ACF61006D8346 /* Build configuration list for PBXNativeTarget "ClevoKBFanControlTests" */ = { 583 | isa = XCConfigurationList; 584 | buildConfigurations = ( 585 | 44AD51BF213ACF61006D8346 /* Debug */, 586 | 44AD51C0213ACF61006D8346 /* Release */, 587 | ); 588 | defaultConfigurationIsVisible = 0; 589 | defaultConfigurationName = Release; 590 | }; 591 | 44AD51C1213ACF61006D8346 /* Build configuration list for PBXNativeTarget "ClevoKBFanControlUITests" */ = { 592 | isa = XCConfigurationList; 593 | buildConfigurations = ( 594 | 44AD51C2213ACF61006D8346 /* Debug */, 595 | 44AD51C3213ACF61006D8346 /* Release */, 596 | ); 597 | defaultConfigurationIsVisible = 0; 598 | defaultConfigurationName = Release; 599 | }; 600 | /* End XCConfigurationList section */ 601 | }; 602 | rootObject = 44AD518D213ACF61006D8346 /* Project object */; 603 | } 604 | -------------------------------------------------------------------------------- /ClevoKBFanControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ClevoKBFanControl.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ClevoKBFanControl.xcodeproj/project.xcworkspace/xcuserdata/deanu.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl.xcodeproj/project.xcworkspace/xcuserdata/deanu.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ClevoKBFanControl.xcodeproj/xcuserdata/deanu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ClevoKBFanControl.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ClevoKBFanControl/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ClevoKBFanControl 4 | // 5 | // Created by deanu on 2018/9/1. 6 | // Copyright © 2018年 deanu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "Icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "Icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "Icon_32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "Icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "Icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "Icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "Icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "Icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "Icon_512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "Icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/ClevoKBFanControl/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png -------------------------------------------------------------------------------- /ClevoKBFanControl/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | Default 530 | 531 | 532 | 533 | 534 | 535 | 536 | Left to Right 537 | 538 | 539 | 540 | 541 | 542 | 543 | Right to Left 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | Default 555 | 556 | 557 | 558 | 559 | 560 | 561 | Left to Right 562 | 563 | 564 | 565 | 566 | 567 | 568 | Right to Left 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 779 | 790 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 845 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | -------------------------------------------------------------------------------- /ClevoKBFanControl/ClevoCtrlWrapper.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // ClevoCtrlWrapper.cpp 3 | // ClevoKBFanControl 4 | // 5 | // Created by deanu on 2018/9/2. 6 | // Copyright © 2018年 deanu. All rights reserved. 7 | // 8 | 9 | #include 10 | #include "ECCtrl.h" 11 | // extern "C" will cause the C++ compiler 12 | // (remember, this is still C++ code!) to 13 | // compile the function in such a way that 14 | // it can be called from C 15 | // (and Swift). 16 | ClevoCtrl clevo; 17 | 18 | extern "C" void setkbMode(int mode) 19 | { 20 | // Create an instance of A, defined in 21 | // the library, and call getInt() on it: 22 | clevo.setMode(mode); 23 | } 24 | 25 | //void setlightSwitch(int); 26 | //void setkbBrightness(int); 27 | //void setmbFan(int); 28 | 29 | extern "C" void setlightSwitch(int sch) 30 | { 31 | // Create an instance of A, defined in 32 | // the library, and call getInt() on it: 33 | clevo.setSwitch(sch); 34 | } 35 | 36 | extern "C" void setkbBrightness(int brt) 37 | { 38 | // Create an instance of A, defined in 39 | // the library, and call getInt() on it: 40 | clevo.setBrightness(brt); 41 | } 42 | 43 | extern "C" void setmbautoFan() 44 | { 45 | // Create an instance of A, defined in 46 | // the library, and call getInt() on it: 47 | clevo.setautoFan(); 48 | } 49 | 50 | extern "C" void setmbFan(int startTemp, int stopTemp,int fanMaxSpeed) 51 | { 52 | // Create an instance of A, defined in 53 | // the library, and call getInt() on it: 54 | clevo.setFan(startTemp, stopTemp, fanMaxSpeed); 55 | } 56 | 57 | extern "C" void setfullcolor(char* color) 58 | { 59 | // Create an instance of A, defined in 60 | // the library, and call getInt() on it: 61 | clevo.setfullColor(color); 62 | } 63 | 64 | extern "C" void setsepcolor(char* color){ 65 | clevo.setsepColor(color); 66 | } 67 | -------------------------------------------------------------------------------- /ClevoKBFanControl/ClevoKBFanControl-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | void setkbMode(int); 5 | void setlightSwitch(int); 6 | inline void setkbBrightness(int); 7 | inline void setmbautoFan(); 8 | inline void setmbFan(int,int,int); 9 | inline void setfullcolor(char*); 10 | void setsepcolor(char*); 11 | -------------------------------------------------------------------------------- /ClevoKBFanControl/ClevoKBFanControl.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ClevoKBFanControl/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.utilities 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2018年 deanu. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /ClevoKBFanControl/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ClevoKBFanControl 4 | // 5 | // Created by deanu on 2018/9/1. 6 | // Copyright © 2018年 deanu. All rights reserved. 7 | // 8 | import Cocoa 9 | 10 | let on = 1 11 | let off = 0 12 | 13 | class ViewController: NSViewController { 14 | @IBOutlet weak var colorValue: NSTextField! 15 | @IBOutlet var errShow: NSTextView! 16 | @IBOutlet weak var onBtn: NSButton! 17 | @IBOutlet weak var offBtn: NSButton! 18 | @IBOutlet weak var modePop: NSPopUpButton! 19 | @IBOutlet weak var modeCheck: NSButton! 20 | @IBOutlet weak var brightnessPop: NSPopUpButton! 21 | @IBOutlet weak var brightnessCheck: NSButton! 22 | @IBOutlet weak var leftKb: NSTextField! 23 | @IBOutlet weak var cenKb: NSTextField! 24 | @IBOutlet weak var rightKb: NSTextField! 25 | @IBOutlet weak var autoCheck: NSButton! 26 | @IBOutlet weak var selfCheck: NSButton! 27 | @IBOutlet weak var useCheck: NSButton! 28 | @IBOutlet weak var startTemp: NSTextField! 29 | @IBOutlet weak var stopTemp: NSTextField! 30 | @IBOutlet weak var maxSpeed: NSTextField! 31 | @IBOutlet weak var colorWell: NSColorWell! 32 | 33 | @IBAction func setColor(_ sender: NSColorWell) { 34 | colorValue.stringValue = colorWell.color.toHexString() 35 | } 36 | 37 | override func viewDidLoad() { 38 | super.viewDidLoad() 39 | // Do any additional setup after loading the view. 40 | } 41 | 42 | @IBAction func invokeCmd(_ sender: Any) { 43 | 44 | var cmdout:String = "" 45 | var lightonflag = true 46 | var kbcolor = true 47 | var modeflag = true 48 | 49 | let hexstr = colorValue.stringValue 50 | let leftstr = leftKb.stringValue 51 | let censtr = cenKb.stringValue 52 | let rightstr = rightKb.stringValue 53 | let sepstr = leftstr + censtr + rightstr 54 | let startstr = startTemp.stringValue 55 | let stopstr = stopTemp.stringValue 56 | let maxstr = maxSpeed.stringValue 57 | 58 | 59 | if lightSwitch() == "OFF" { 60 | setlightSwitch(0) 61 | lightonflag = false 62 | cmdout = cmdout + "键盘灯:OFF\t" 63 | } 64 | 65 | if lightonflag { 66 | setlightSwitch(1) 67 | cmdout = cmdout + "键盘灯:ON\t" 68 | if brightnessCheck.state.rawValue == 1 { 69 | setkbBrightness(Int32(brightnessPop.indexOfSelectedItem)) 70 | cmdout = cmdout + "亮度:" + String(brightnessPop.indexOfSelectedItem) + "\t" 71 | } 72 | 73 | if !leftstr.isEmpty && !censtr.isEmpty && !rightstr.isEmpty { 74 | if leftstr.count == 6 && censtr.count == 6 && rightstr.count == 6{ 75 | let sepcolor = UnsafeMutablePointer(mutating: sepstr) 76 | setsepcolor(sepcolor) 77 | cmdout = cmdout + "颜色:分区域\t" 78 | modeflag = false 79 | kbcolor = false 80 | } 81 | else{ 82 | cmdout = cmdout + "分区域颜色设置错误!\t" 83 | } 84 | } 85 | if kbcolor { 86 | if !hexstr.isEmpty { 87 | if hexstr.count == 6 { 88 | let color = UnsafeMutablePointer(mutating: hexstr) 89 | setfullcolor(color) 90 | cmdout = cmdout + "颜色:全键盘\t" 91 | modeflag = false 92 | } 93 | else{ 94 | cmdout = cmdout + "全键盘颜色设置错误!\t" 95 | } 96 | } 97 | } 98 | 99 | if modeCheck.state.rawValue == 1 { 100 | if modeflag { 101 | if Int32(modePop.indexOfSelectedItem) == 0{ 102 | let hexstr = "0000FF" 103 | let color = UnsafeMutablePointer(mutating: hexstr) 104 | setfullcolor(color) 105 | 106 | } 107 | else{ 108 | setkbMode(Int32(modePop.indexOfSelectedItem)) 109 | } 110 | cmdout = cmdout + "模式:" + modePop.itemTitle(at: modePop.indexOfSelectedItem) + "\t" 111 | } 112 | } 113 | } 114 | 115 | if useCheck.state.rawValue == 1 { 116 | if autoCheck.state.rawValue == 1 { 117 | setmbautoFan() 118 | cmdout = cmdout + "速度:AUTO\t" 119 | } 120 | else if selfCheck.state.rawValue == 1 { 121 | setmbFan(Int32(Int(startstr)!),Int32(stopstr)!,Int32(maxstr)!) 122 | cmdout = cmdout + "速度:自定义\t" 123 | } 124 | } 125 | errShow.string = cmdout 126 | } 127 | 128 | @IBAction func onAct(_ sender: Any) { 129 | if onBtn.state.rawValue == on { 130 | offBtn.state = NSControl.StateValue(rawValue: off) 131 | } 132 | setlightSwitch(1) 133 | } 134 | 135 | @IBAction func offAct(_ sender: Any) { 136 | if offBtn.state.rawValue == on { 137 | onBtn.state = NSControl.StateValue(rawValue: off) 138 | } 139 | setlightSwitch(0) 140 | } 141 | 142 | @IBAction func autoAct(_ sender: Any) { 143 | if autoCheck.state.rawValue == on { 144 | selfCheck.state = NSControl.StateValue(rawValue: off) 145 | } 146 | } 147 | 148 | @IBAction func selfAct(_ sender: Any) { 149 | if selfCheck.state.rawValue == on { 150 | autoCheck.state = NSControl.StateValue(rawValue: off) 151 | } 152 | } 153 | 154 | func lightSwitch() -> String { 155 | if offBtn.state.rawValue == on { 156 | return "OFF" 157 | } 158 | return "ON" 159 | } 160 | 161 | override var representedObject: Any? { 162 | didSet { 163 | // Update the view, if already loaded. 164 | } 165 | } 166 | } 167 | 168 | extension NSColor { 169 | 170 | func toHexString() -> String { 171 | var r:CGFloat = 0 172 | var g:CGFloat = 0 173 | var b:CGFloat = 0 174 | var a:CGFloat = 0 175 | getRed(&r, green: &g, blue: &b, alpha: &a) 176 | let rgb:Int = (Int)(r*255)<<16 | (Int)(g*255)<<8 | (Int)(b*255)<<0 177 | return String(format:"%06x", rgb) 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /ClevoKBFanControlTests/ClevoKBFanControlTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClevoKBFanControlTests.swift 3 | // ClevoKBFanControlTests 4 | // 5 | // Created by deanu on 2018/9/1. 6 | // Copyright © 2018年 deanu. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import ClevoKBFanControl 11 | 12 | class ClevoKBFanControlTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ClevoKBFanControlTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ClevoKBFanControlUITests/ClevoKBFanControlUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClevoKBFanControlUITests.swift 3 | // ClevoKBFanControlUITests 4 | // 5 | // Created by deanu on 2018/9/1. 6 | // Copyright © 2018年 deanu. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ClevoKBFanControlUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ClevoKBFanControlUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Clevo中蓝天模具键盘灯及风扇控制软件 2 | * 如何安装 3 | 4 | ``` 5 | 1. 首先搜索DSDT,确保有WMBB方法。 6 | 2. 将我提供的SSDT-SMCD.aml放在CLOVER/ACPI/patched文件夹下。 7 | 3. 将我提供的ClevoControl.kext安装在/Library/Extensions,请不要装在/System/Library/Extensions中,不然可能会出现内核崩溃。 8 | 4. 重启后,安装我提供的GUI控制软件就可以控制键盘灯的亮度和颜色以及风扇速度。 9 | ``` 10 | * 软件使用介绍 11 | 12 | ![程序截图](img/demo.png) 13 | ``` 14 | 1. 键盘灯开关控制键盘灯。 15 | 2. 键盘灯亮度有4个亮度级别,需要勾选启用才会生效。 16 | 3. 键盘灯模式有8个模式,默认为呼吸灯,需要勾选启用才会生效。 17 | 4. 全键盘颜色用来设置整个键盘的颜色,点选右侧颜色条选择颜色。 18 | 5. 分区域颜色用来设置分块键盘的颜色,点选颜色条选择颜色。 19 | 6. 风扇转速用来控制设备风扇,有默认值和自定义两个选项,自定义需要设置起始温度,停止温度,以及最大转速,最大转速为百分比,需要勾选启用才会生效。 20 | ``` 21 | 目前软件暂不支持重启后保存设置,后续会添加。 22 | * 支持的设备 23 | 24 | |产品名|模具型号| 25 | |---|---| 26 | |P15SM|Clevo P15SM| 27 | |P15SM1-A|Clevo P15SM1-A| 28 | |P15SM-A|Clevo P15SM-A| 29 | |P150EM|Clevo P150EM| 30 | |P15xEMx|Clevo P150EM| 31 | |P17SM-A|Clevo P17SM-A| 32 | |P17SM|Clevo P17SM| 33 | |P370SM-A|Clevo P370SM-A| 34 | |P65_67RSRP|Clevo P65_67RSRP| 35 | |P65xRP|Clevo P65xRP| 36 | |P65xHP|Clevo P65xHP| 37 | |Deimos/Phobos 1x15S|Clevo P7xxDM(-G)| 38 | |P7xxDM(-G)|Clevo P7xxDM(-G)| 39 | |P7xxDM2(-G)|Clevo P7xxDM2(-G)| 40 | |P750ZM|Clevo P750ZM| 41 | |P5 Pro SE|Clevo P750ZM| 42 | |P5 Pro|Clevo P750ZM| 43 | |P775DM3(-G)|Clevo P775DM3(-G)| 44 | |N85_N87|Clevo N850HJ| 45 | |P870DM|Clevo P870DM| 46 | |N85_N87,HJ,HJ1,HK1|Clevo N870HK| 47 | |N85_87HP6|Clevo N870HP6| 48 | |P95_HP,HR,HQ|Clevo P950HP6| 49 | |P65_67HSHP|Clevo P65_67HSHP| 50 | 51 | * 感谢 52 | Clevo控制部分源代码参考[clevo-xsm-wmi](https://bitbucket.org/tuxedocomputers/clevo-xsm-wmi)以及[ClevoControl](https://github.com/datasone/ClevoControl) 53 | -------------------------------------------------------------------------------- /Src/ClevoControl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/Src/ClevoControl.a -------------------------------------------------------------------------------- /Src/ClevoControl.cpp: -------------------------------------------------------------------------------- 1 | #include "ECCtrl.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #define SET_KB_LED 0x67 9 | #define SET_FAN 0x79 10 | 11 | using std::string; 12 | 13 | void sendctl(struct ECCtrl ctrl) 14 | { 15 | struct ctl_info info; 16 | struct sockaddr_ctl addr; 17 | int fd = socket(PF_SYSTEM, SOCK_DGRAM, SYSPROTO_CONTROL); 18 | if (fd != -1) 19 | { 20 | bzero(&addr, sizeof(addr)); 21 | addr.sc_len = sizeof(addr); 22 | addr.sc_family = AF_SYSTEM; 23 | addr.ss_sysaddr = AF_SYS_CONTROL; 24 | memset(&info, 0, sizeof(info)); 25 | strcpy(info.ctl_name, "moe.datasone.clevocontrol.ctl"); 26 | if (ioctl(fd, CTLIOCGINFO, &info)) 27 | { 28 | exit(-1); 29 | } 30 | addr.sc_id = info.ctl_id; 31 | addr.sc_unit = 0; 32 | if (connect(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_ctl))) 33 | exit(-1); 34 | send(fd, &ctrl, sizeof(ECCtrl), 0); 35 | } 36 | } 37 | 38 | void ClevoCtrl::setMode(int mode) { 39 | ClevoCtrl::ctrl.arg0 = 0; 40 | ClevoCtrl::ctrl.arg1 = SET_KB_LED; 41 | ClevoCtrl::ctrl2.arg0 = 0; 42 | ClevoCtrl::ctrl2.arg1 = SET_KB_LED; 43 | ClevoCtrl::ctrl2.arg2 = 0x10000000; 44 | if (mode == 1) 45 | ClevoCtrl::ctrl.arg2 = 0x1002A000; 46 | else if (mode == 2) 47 | ClevoCtrl::ctrl.arg2 = 0x33010000; 48 | else if (mode == 3) 49 | ClevoCtrl::ctrl.arg2 = 0x80000000; 50 | else if (mode == 4) 51 | ClevoCtrl::ctrl.arg2 = 0xA0000000; 52 | else if (mode == 5) 53 | ClevoCtrl::ctrl.arg2 = 0x70000000; 54 | else if (mode == 6) 55 | ClevoCtrl::ctrl.arg2 = 0x90000000; 56 | else if (mode == 7) 57 | ClevoCtrl::ctrl.arg2 = 0xB0000000; 58 | sendctl(ClevoCtrl::ctrl2); 59 | sendctl(ClevoCtrl::ctrl); 60 | } 61 | 62 | //开关 63 | void ClevoCtrl::setSwitch(int sch) { 64 | ClevoCtrl::ctrl.arg0 = 0; 65 | ClevoCtrl::ctrl.arg1 = SET_KB_LED; 66 | ClevoCtrl::ctrl.arg2 = 0xE0000000; 67 | if (sch == 0) { 68 | ClevoCtrl::ctrl.arg2 |= 0x003001; 69 | sendctl(ClevoCtrl::ctrl); 70 | } 71 | else 72 | { 73 | ClevoCtrl::ctrl.arg2 |= 0x07F001; 74 | sendctl(ClevoCtrl::ctrl); 75 | } 76 | } 77 | 78 | //亮度 79 | void ClevoCtrl::setBrightness(int brt){ 80 | uint8_t lvl_to_raw[] = { 63, 126, 189, 252 }; 81 | ClevoCtrl::ctrl.arg0 = 0; 82 | ClevoCtrl::ctrl.arg1 = SET_KB_LED; 83 | ClevoCtrl::ctrl.arg2 = 0xF4000000 | lvl_to_raw[brt]; 84 | sendctl(ClevoCtrl::ctrl); 85 | } 86 | 87 | //full color 88 | void ClevoCtrl::setfullColor(char color[]){ 89 | string state = color; 90 | string state_brg = state.substr(4, 2) + state.substr(0, 2) + state.substr(2, 2); 91 | uint32_t i = std::stoul(state_brg, nullptr, 16); 92 | ClevoCtrl::ctrl2.arg0 = 0; 93 | ClevoCtrl::ctrl2.arg1 = SET_KB_LED; 94 | ClevoCtrl::ctrl2.arg2 = 0x10000000; 95 | sendctl(ClevoCtrl::ctrl2); 96 | ClevoCtrl::ctrl.arg0 = 0; 97 | ClevoCtrl::ctrl.arg1 = SET_KB_LED; 98 | ClevoCtrl::ctrl.arg2 = 0xF0000000; 99 | ClevoCtrl::ctrl.arg2 |= i; 100 | sendctl(ClevoCtrl::ctrl); 101 | ClevoCtrl::ctrl.arg2 = 0xF1000000; 102 | ClevoCtrl::ctrl.arg2 |= i; 103 | sendctl(ClevoCtrl::ctrl); 104 | ClevoCtrl::ctrl.arg2 = 0xF2000000; 105 | ClevoCtrl::ctrl.arg2 |= i; 106 | sendctl(ClevoCtrl::ctrl); 107 | } 108 | //sep color 109 | void ClevoCtrl::setsepColor(char color[]){ 110 | ClevoCtrl::ctrl2.arg0 = 0; 111 | ClevoCtrl::ctrl2.arg1 = SET_KB_LED; 112 | ClevoCtrl::ctrl2.arg2 = 0x10000000; 113 | sendctl(ClevoCtrl::ctrl2); 114 | ClevoCtrl::ctrl.arg0 = 0; 115 | ClevoCtrl::ctrl.arg1 = SET_KB_LED; 116 | string stateList = color; 117 | string colors[3]; 118 | for (int i = 0; i < 3; ++i) { 119 | colors[i] = stateList.substr(6 * i + i, 6); 120 | colors[i] = colors[i].substr(4, 2) + colors[i].substr(0, 2) + colors[i].substr(2, 2); 121 | uint32_t j = std::stoul(colors[i], nullptr, 16); 122 | ClevoCtrl::ctrl.arg2 = 0xF0000000 + i * 0x1000000; 123 | ClevoCtrl::ctrl.arg2 |= j; 124 | sendctl(ClevoCtrl::ctrl); 125 | } 126 | } 127 | 128 | //fan 129 | void ClevoCtrl::setautoFan(){ 130 | ClevoCtrl::ctrl.arg0 = 0; 131 | ClevoCtrl::ctrl.arg1 = SET_FAN; 132 | ClevoCtrl::ctrl.arg2 = 0x1000000; 133 | sendctl(ClevoCtrl::ctrl); 134 | ClevoCtrl::ctrl.arg2 = 0; 135 | ClevoCtrl::ctrl.arg2 |= 0x7000000; 136 | sendctl(ClevoCtrl::ctrl); 137 | } 138 | 139 | void ClevoCtrl::setFan(int startTemp,int stopTemp,int fanMaxSpeed){ 140 | int ctrlData = (fanMaxSpeed << 16) + (stopTemp << 8) + startTemp; 141 | ctrlData |= 0x7000000; 142 | ClevoCtrl::ctrl.arg0 = 0; 143 | ClevoCtrl::ctrl.arg1 = SET_FAN; 144 | ClevoCtrl::ctrl.arg2 = ctrlData; 145 | sendctl(ClevoCtrl::ctrl); 146 | } 147 | -------------------------------------------------------------------------------- /Src/ClevoControl.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/Src/ClevoControl.o -------------------------------------------------------------------------------- /Src/ECCtrl.h: -------------------------------------------------------------------------------- 1 | // 2 | // ECCtrl.h 3 | // ClevoControl 4 | // 5 | // Created by datasone on 9/8/2017. 6 | // Copyright © 2017 datasone. All rights reserved. 7 | // 8 | #ifndef ECCtrl_h 9 | #define ECCtrl_h 10 | 11 | #include 12 | 13 | struct ECCtrl { 14 | uint32_t arg0, arg1, arg2; 15 | }; 16 | 17 | class ClevoCtrl 18 | { 19 | public: 20 | void setSwitch(int); 21 | void setMode(int); 22 | void setBrightness(int); 23 | void setautoFan(); 24 | void setFan(int,int,int); 25 | void setfullColor(char*); 26 | void setsepColor(char*); 27 | struct ECCtrl ctrl; 28 | struct ECCtrl ctrl2; 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /img/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanu/ClevoKBFanControl/c2e2a801764b073a5b5b4493d72120c9b561d12f/img/demo.png --------------------------------------------------------------------------------