Pinecil uart (#830)
* Creating uart debug handler * Simpler get raw uV tip * Update Setup.cpp * Debug out working. Moved Logo Need to update docs around logos before merging this in * Add in current pwm level + fix signed int * Update moving logo page for pinecil by 64k * Update TipThermoModel.h
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
* This was bought to my attention by <Kuba Sztandera>
|
||||
*/
|
||||
|
||||
uint32_t TipThermoModel::convertTipRawADCTouV(uint16_t rawADC) {
|
||||
uint32_t TipThermoModel::convertTipRawADCTouV(uint16_t rawADC, bool skipCalOffset) {
|
||||
// This takes the raw ADC samples, converts these to uV
|
||||
// Then divides this down by the gain to convert to the uV on the input to the op-amp (A+B terminals)
|
||||
// Then remove the calibration value that is stored as a tip offset
|
||||
@@ -41,9 +41,9 @@ uint32_t TipThermoModel::convertTipRawADCTouV(uint16_t rawADC) {
|
||||
// Now to divide this down by the gain
|
||||
valueuV /= OP_AMP_GAIN_STAGE;
|
||||
|
||||
if (systemSettings.CalibrationOffset) {
|
||||
if (systemSettings.CalibrationOffset && skipCalOffset == false) {
|
||||
// Remove uV tipOffset
|
||||
if (valueuV >= systemSettings.CalibrationOffset)
|
||||
if (valueuV > systemSettings.CalibrationOffset)
|
||||
valueuV -= systemSettings.CalibrationOffset;
|
||||
else
|
||||
valueuV = 0;
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
static uint32_t convertTipRawADCToDegC(uint16_t rawADC);
|
||||
static uint32_t convertTipRawADCToDegF(uint16_t rawADC);
|
||||
// Returns the uV of the tip reading before the op-amp compensating for pullups
|
||||
static uint32_t convertTipRawADCTouV(uint16_t rawADC);
|
||||
static uint32_t convertTipRawADCTouV(uint16_t rawADC,bool skipCalOffset=false);
|
||||
static uint32_t convertCtoF(uint32_t degC);
|
||||
static uint32_t convertFtoC(uint32_t degF);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user