Skip to content

Commit d3fb47f

Browse files
committed
take out self test
1 parent 51b6510 commit d3fb47f

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

Factory_Tests/TRRS_Trinkey_FactoryTest/TRRS_Trinkey_FactoryTest.ino

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ Adafruit_USBD_HID usb_hid;
2121
extern Adafruit_TestBed TB;
2222
uint8_t allpins[] = {PIN_TIP, PIN_RING1, PIN_RING2, PIN_SLEEVE};
2323

24-
25-
bool selftest = false;
2624
bool cableinserted = false;
2725
bool last_cablestate = false;
2826
uint32_t last_i2cscan = 0;
@@ -53,40 +51,6 @@ void setup() {
5351
void loop() {
5452
delay(10); // sample every 10 ms
5553

56-
if (Serial.available() && (Serial.read() == 0xAF)) {
57-
selftest = true;
58-
}
59-
60-
if (selftest) {
61-
Serial.println("TRRS Trinkey self-tester!");
62-
63-
// check tied pins
64-
if (! TB.testpins(PIN_RING1, PIN_RING2, allpins, sizeof(allpins))) return;
65-
if (! TB.testpins(PIN_SLEEVE, PIN_TIP, allpins, sizeof(allpins))) return;
66-
67-
pinMode(PIN_RING1, OUTPUT);
68-
digitalWrite(PIN_RING1, LOW);
69-
pinMode(PIN_RING1_SWITCH, INPUT_PULLUP);
70-
delay(10);
71-
if (!digitalRead(PIN_RING1_SWITCH)) {
72-
Serial.println("Ring1 switch not floating");
73-
return;
74-
}
75-
pinMode(PIN_TIP, OUTPUT);
76-
digitalWrite(PIN_TIP, LOW);
77-
pinMode(PIN_TIP_SWITCH, INPUT_PULLUP);
78-
delay(10);
79-
if (!digitalRead(PIN_TIP_SWITCH)) {
80-
Serial.println("Tip switch not floating");
81-
return;
82-
}
83-
84-
Serial.println("**TEST OK!**");
85-
86-
delay(100);
87-
return;
88-
}
89-
9054
uint8_t keycode[6] = { 0 };
9155
uint8_t count = 0;
9256
// used to avoid send multiple consecutive zero report for keyboard

0 commit comments

Comments
 (0)