From fd172492d7231fa85606eeea16a0e6b3804834b9 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 29 Aug 2019 11:53:56 -0700 Subject: [PATCH] Added gain factor to serial debug output #featureadd --- .../Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h index 3fc7e7a..5d445c2 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h @@ -160,6 +160,29 @@ void serialReply() { Serial.print(" "); Serial.println(senseInt); + Serial.print("Gain Factor:"); + Serial.print(GAIN_FACTOR); + switch (GAIN_FACTOR) { + case 0: + Serial.println(" 3x"); + break; + case 1: + Serial.println(" 3.5x"); + break; + case 2: + Serial.println(" 4.33x"); + break; + case 3: + Serial.println(" 6x"); + break; + case 4: + Serial.println(" 11x"); + break; + default: + Serial.println(" INVALID"); + break; + } + #endif Serial.print("Delay:");