mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-29 05:18:43 +02:00
Merge remote-tracking branch 'origin/develop' into xap
This commit is contained in:
@@ -147,7 +147,7 @@ void process_wlength(const uint16_t w_length) {
|
||||
// now try to make a guess
|
||||
os_variant_t guessed = OS_UNSURE;
|
||||
if (setups_data.count >= 3) {
|
||||
if (setups_data.cnt_ff >= 2 && setups_data.cnt_04 >= 1) {
|
||||
if (setups_data.cnt_ff >= 2 && setups_data.cnt_04 >= 1 && setups_data.cnt_02 < 2) {
|
||||
guessed = OS_WINDOWS;
|
||||
} else if (setups_data.count == setups_data.cnt_ff) {
|
||||
// Linux has 3 packets with 0xFF.
|
||||
|
||||
@@ -71,6 +71,7 @@ macOS 12.5: [2, 24, 2, 28, FF]
|
||||
macOS 15.1.x: [ 2, 4E, 2, 1C, 2, 1A, FF, FF]
|
||||
macOS 15.x (another host): [ 2, 0E, 2, 1E, 2, 42, FF]
|
||||
macOS 15.x (periodic weirdness): [ 2, 42, 2, 1C, 2, 1A, FF, 2, 42, 2, 1C, 2, 1A, FF ]
|
||||
macOS 26.x: [02, 22, 02, 0E, 02, 42, FF, FF, 4, FF]
|
||||
iOS/iPadOS 15.6: [2, 24, 2, 28]
|
||||
Linux (including Android, Raspberry Pi and WebOS TV): [FF, FF, FF]
|
||||
Linux (another host): [FF, FF, FF, FF, FF, FF]
|
||||
@@ -163,6 +164,12 @@ TEST_F(OsDetectionTest, TestChibiosMacSequoia3) {
|
||||
assert_not_reported();
|
||||
}
|
||||
|
||||
TEST_F(OsDetectionTest, TestChibiosMacosWithLate04Packet) {
|
||||
EXPECT_EQ(check_sequence({0x02, 0x22, 0x02, 0x0E, 0x02, 0x42, 0xFF, 0xFF, 0x04, 0xFF}), OS_MACOS);
|
||||
os_detection_task();
|
||||
assert_not_reported();
|
||||
}
|
||||
|
||||
TEST_F(OsDetectionTest, TestLufaMacos) {
|
||||
EXPECT_EQ(check_sequence({0x2, 0x10, 0x2, 0xE, 0xFF}), OS_MACOS);
|
||||
os_detection_task();
|
||||
|
||||
Reference in New Issue
Block a user