Support for S99

* Enable PD Options
* Make PDNegTimeout configureable
* Add default value for PDNegTimeout, also for S60 and S60P
* Add basic DC detection / correct debug readings while powered via DC
* Add basic ThermoModel for C245 Tips
* Modify op-amp gain
This commit is contained in:
jonasius
2024-06-06 22:35:35 +02:00
parent 6e53d85b32
commit 6ef1fbd46a
8 changed files with 60 additions and 14 deletions

View File

@@ -4,6 +4,7 @@
#include "QC3.h"
#include "Settings.h"
#include "USBPD.h"
#include "FS2711.hpp"
#include "configuration.h"
void power_check() {
@@ -16,9 +17,26 @@ void power_check() {
return; // We are using PD
}
#endif
#if POW_PD_EXT == 2
if (FS2711::has_run_selection()) {
return;
}
#endif
#ifdef POW_QC
QC_resync();
#endif
}
bool getIsPoweredByDCIN() { return false; }
bool getIsPoweredByDCIN() {
#if POW_PD_EXT == 2 && defined(POW_DC)
if (!FS2711::has_run_selection()) {
return true;
} else if(FS2711::debug_get_state().source_voltage > 0) {
return false;
} else {
return true;
}
#else
return false;
#endif
}