瀏覽代碼

fixed CC display

Toby Chui 8 月之前
父節點
當前提交
a8bca95443
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      firmware/pd-psu_v1/pd-psu_v1.ino

+ 1 - 0
firmware/pd-psu_v1/pd-psu_v1.ino

@@ -49,6 +49,7 @@ void loop() {
   //Read the analog reading of both pins
   voltageReading = analogRead(VOLTAGE_PIN);
   currentReading = analogRead(CURRENT_PIN);
+  isCCMode = !digitalRead(CCCV_PIN);
 
   //Convert them to actual voltage / current value
   voltageReading = map(voltageReading, 0, 255, 0, 500) * 4;  //30k - 10k voltage divider