Skip to content
Merged
Show file tree
Hide file tree
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
Binary file added Database/light_images/hs60c-pro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Database/light_images/hs60c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions Database/lights.json
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,42 @@
"newPowerLightCommand": true,
"newRGBLightCommand": true,
"fxPreset": "fx17_mac"
},
{
"type": 87,
"name": "Neewer HS60C",
"image": "hs60c.png",
"link": "https://neewer.com/products/neewer-hs60c-60w-portable-rgb-led-video-light-66606314",
"supportRGB": true,
"supportCCTGM": true,
"supportMusic": true,
"support17FX": true,
"support9FX": false,
"cctRange": {
"min": 27,
"max": 65
},
"newPowerLightCommand": true,
"newRGBLightCommand": true,
"fxPreset": "fx17_mac"
},
{
"type": 88,
"name": "Neewer HS60C Pro",
"image": "hs60c-pro.png",
"link": "https://neewer.com/products/neewer-hs60c-pro-60w-portable-rgb-led-video-light-66607068",
"supportRGB": true,
"supportCCTGM": true,
"supportMusic": true,
"support17FX": true,
"support9FX": false,
"cctRange": {
"min": 27,
"max": 65
},
"newPowerLightCommand": true,
"newRGBLightCommand": true,
"fxPreset": "fx17_mac"
}
],
"gels": [
Expand Down
24 changes: 24 additions & 0 deletions NeewerLite/NeewerLite/Model/NeewerLightConstant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ class NeewerLightConstant {
return "TL21C"
case 71:
return "SL90"
case 87:
return "HS60C"
case 88:
return "HS60C Pro"
case 73:
return "MS150C"
case 74:
Expand Down Expand Up @@ -216,6 +220,8 @@ class NeewerLightConstant {
return "RGB1200"
case "20230031":
return "TL120C"
case "20230042":
return "HS60C"
case "20230050":
return "FS230 5600K"
case "20230051":
Expand Down Expand Up @@ -348,6 +354,20 @@ class NeewerLightConstant {
// Not sure.
var lightType: UInt8 = 8

let ru = rawname.uppercased(), nu = nickName.uppercased(), pu = projectName.uppercased()
// HS60C Pro vs HS60C (“HS60C PRO” contains “HS60C”); legacy “HS60 Pro Lite”; raw SKU / name.
let hs60Haystack = [ru, nu, pu].joined(separator: "\n")
if hs60Haystack.contains("HS60C PRO") || hs60Haystack.contains("HS60C-PRO") || hs60Haystack.contains("HS60CPRO") {
return 88
}
if hs60Haystack.contains("HS60 PRO LITE") || hs60Haystack.contains("HS60-PRO-LITE")
|| hs60Haystack.contains("HS60PROLITE") {
return 87
}
if ru.contains("HS60C") || ru.hasPrefix("NW-20230042") {
return 87
}

// Some newer SL90 variants ("Infinity" protocol) are renamed by the app to "SL90-...",
// which can cause nickname-based matching to fail. Detect via the raw BLE name instead.
// Ref: https://github.com/keefo/NeewerLite/issues/94
Expand Down Expand Up @@ -522,6 +542,10 @@ class NeewerLightConstant {
lightType = 64
return lightType
}
if nickName.contains("HS60C") {
lightType = 87
return lightType
}
if nickName.contains("HS60B") {
lightType = 66
return lightType
Expand Down
31 changes: 31 additions & 0 deletions NeewerLite/NeewerLiteTests/NeewerLiteTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,37 @@ class NeewerLiteTests: XCTestCase {
XCTAssertEqual(name.nickName, "SL90-3686F0")
XCTAssertEqual(name.projectName, "SL90")
XCTAssertEqual(NeewerLightConstant.getLightType(nickName: name.nickName, rawname: "NW-20240073&00000000", projectName: name.projectName), 71, "")

name = NeewerLightConstant.getLightNames(rawName: "NEEWER-HS60C", identifier: "DEE0BA8C-D9B4-B7DB-0FD2-2531C7E4B053")
XCTAssertEqual(name.nickName, "HS60C-E4B053")
XCTAssertEqual(name.projectName, "HS60C")
XCTAssertEqual(NeewerLightConstant.getLightType(nickName: name.nickName, rawname: "", projectName: name.projectName), 87, "")

name = NeewerLightConstant.getLightNames(rawName: "NEEWER-HS60 Pro Lite", identifier: "DEE0BA8C-D9B4-B7DB-0FD2-2531C7E4B053")
XCTAssertEqual(name.projectName, "HS60 Pro Lite")
XCTAssertEqual(name.nickName, "HS60 Pro Lite-E4B053")
XCTAssertEqual(NeewerLightConstant.getLightType(nickName: name.nickName, rawname: "NEEWER-HS60 Pro Lite", projectName: name.projectName), 87)

name = NeewerLightConstant.getLightNames(rawName: "NEEWER-HS60C PRO", identifier: "DEE0BA8C-D9B4-B7DB-0FD2-2531C7E4B053")
XCTAssertEqual(name.nickName, "HS60C PRO-E4B053")
XCTAssertEqual(name.projectName, "HS60C PRO")
XCTAssertEqual(NeewerLightConstant.getLightType(nickName: name.nickName, rawname: "", projectName: name.projectName), 88, "")

XCTAssertEqual(
NeewerLightConstant.getLightType(nickName: "WEIRD", rawname: "NW-FOO&HS60C-BAR-BAZ", projectName: ""),
87)
XCTAssertEqual(
NeewerLightConstant.getLightType(nickName: "WEIRD", rawname: "NW-FOO&HS60C PRO-BAR", projectName: ""),
88)

name = NeewerLightConstant.getLightNames(rawName: "NW-20230042&30F20500", identifier: "4EFF701E-D042-C210-BFD5-510B7F847EB7")
XCTAssertEqual(name.projectName, "HS60C")
XCTAssertEqual(name.nickName, "HS60C-847EB7")
XCTAssertEqual(NeewerLightConstant.getLightType(nickName: name.nickName, rawname: "NW-20230042&30F20500", projectName: name.projectName), 87)

XCTAssertEqual(
NeewerLightConstant.getLightType(nickName: "WEIRD", rawname: "NW-20230042&30F20500", projectName: "HS60C"),
87)
}

func test_fxCommand() throws {
Expand Down