mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-14 06:21:41 +02:00
Fix oversights in modeling functions
This commit is contained in:
@ -135,4 +135,16 @@ uint16_t LightDetection::readDLPT(photoTransistors sensor){
|
||||
Power::releaseCurrent(PowerParameters::PowerConsumers::PT_DL);
|
||||
digitalWrite(DL_PT_ENABLE,LOW);
|
||||
return result;
|
||||
};
|
||||
};
|
||||
|
||||
float LightDetection::modelCurrentConsumption(photoTransistors sensor){
|
||||
if(sensor == DL_FRONT || sensor == DL_BOTTOM){
|
||||
return PowerParameters::CurrentConsumptions::CURRENT_PT * 2;
|
||||
} else {
|
||||
return PowerParameters::CurrentConsumptions::CURRENT_PT * 4;
|
||||
}
|
||||
};
|
||||
|
||||
float LightDetection::modelChargeConsumptionOn(photoTransistors sensor, uint16_t durationMs) {
|
||||
return LightDetection::modelCurrentConsumption(sensor) * durationMs * 10e6;
|
||||
}
|
Reference in New Issue
Block a user