Knock inputs to be bore diameter and checkbox #6767
only: reusing macro
This commit is contained in:
parent
4a31db928d
commit
f3ff325765
|
@ -12,6 +12,8 @@
|
|||
|
||||
int getCylinderKnockBank(uint8_t cylinderNumber);
|
||||
|
||||
#define bore2frequency(bore) (900 / (CONST_PI * (bore) / 2))
|
||||
|
||||
class KnockControllerBase : public EngineModule, public knock_controller_s {
|
||||
public:
|
||||
KnockControllerBase() {
|
||||
|
|
|
@ -76,7 +76,7 @@ int HIP9011::sendCommandGetReply(uint8_t cmd, uint8_t *reply) {
|
|||
*/
|
||||
float HIP9011::getBand(DEFINE_HIP_PARAMS) {
|
||||
return GET_CONFIG_VALUE(knockBandCustom) == 0 ?
|
||||
HIP9011_BAND(GET_CONFIG_VALUE(cylinderBore)) :
|
||||
bore2frequency(GET_CONFIG_VALUE(cylinderBore)) :
|
||||
GET_CONFIG_VALUE(knockBandCustom);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#define EFI_HIP_9011_DEBUG EFI_HIP_9011
|
||||
#endif
|
||||
|
||||
#define HIP9011_BAND(bore) (900 / (CONST_PI * (bore) / 2))
|
||||
#define HIP9011_ANALOG_OUTPUT_MAX 5.0f
|
||||
#define HIP9011_DIGITAL_OUTPUT_MAX 0x03ff /* 10 bit max value */
|
||||
#define HIP_INPUT_CHANNELS 2
|
||||
|
|
Loading…
Reference in New Issue