aboutsummaryrefslogtreecommitdiff
path: root/hw/lumintop/fw3x-lume1
diff options
context:
space:
mode:
Diffstat (limited to 'hw/lumintop/fw3x-lume1')
-rw-r--r--hw/lumintop/fw3x-lume1/anduril.h1
-rw-r--r--hw/lumintop/fw3x-lume1/hwdef.c10
2 files changed, 7 insertions, 4 deletions
diff --git a/hw/lumintop/fw3x-lume1/anduril.h b/hw/lumintop/fw3x-lume1/anduril.h
index b7dbc82..cd06c6a 100644
--- a/hw/lumintop/fw3x-lume1/anduril.h
+++ b/hw/lumintop/fw3x-lume1/anduril.h
@@ -33,6 +33,7 @@
#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255
#define DEFAULT_LEVEL 56
#define MAX_1x7135 149
+#define MIN_THERM_STEPDOWN 50
#define HALFSPEED_LEVEL 21
#define QUARTERSPEED_LEVEL 11
diff --git a/hw/lumintop/fw3x-lume1/hwdef.c b/hw/lumintop/fw3x-lume1/hwdef.c
index 791a080..306a58c 100644
--- a/hw/lumintop/fw3x-lume1/hwdef.c
+++ b/hw/lumintop/fw3x-lume1/hwdef.c
@@ -83,10 +83,8 @@ bool gradual_tick_main(uint8_t gt) {
// 150/150 is full FET + zero regulated,
// 149/150 is zero FET + full regulated,
// so don't try to gradually adjust between
- if ((RAMP_SIZE == actual_level) || (gt >= RAMP_SIZE-1)) {
- set_level(gt + 1);
- return true;
- }
+ // if target is in the top 2 levels, just let the parent handle it
+ if (gt >= RAMP_SIZE-2) return true;
PWM1_DATATYPE ch1 = PWM1_GET(gt);
@@ -110,6 +108,8 @@ bool gradual_tick_main(uint8_t gt) {
////////// external temperature sensor //////////
+#ifdef ADMUX_THERM_EXTERNAL_SENSOR
+
void hwdef_set_admux_therm() {
// put the ADC in temperature mode
// ADCSRB: [VDEN, VDPD, -, -, ADLAR, ADTS2, ADTS1, ADTS0]
@@ -140,3 +140,5 @@ uint16_t temp_raw2cooked(uint16_t measurement) {
return k6;
}
+#endif
+
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.