Just saving

This commit is contained in:
2025-07-10 17:23:22 +02:00
parent 222ffea568
commit c1622bb01c
11 changed files with 352 additions and 104 deletions

View File

@@ -34,13 +34,34 @@ int adc_sensor_init(void);
uint16_t adc_sensor_get_voltage_mv(void);
/**
* @brief Gets the current motor current reading.
* @brief Gets the current motor current reading (legacy function).
*
* This function reads the value from the motor driver's sense pin via ADC
* and converts it to milliamps. This is used for end-stop detection.
* This function reads the current from the opening channel (IN0).
* For backward compatibility only. Use adc_sensor_get_current_open_ma()
* instead.
*
* @return The motor current in milliamps (mA).
*/
uint16_t adc_sensor_get_current_ma(void);
/**
* @brief Gets the motor opening current reading (IN0 current sense).
*
* This function reads the current from the VND7050AJ IN0 current sense channel.
* Used for monitoring valve opening current.
*
* @return The motor opening current in milliamps (mA).
*/
uint16_t adc_sensor_get_current_open_ma(void);
/**
* @brief Gets the motor closing current reading (IN1 current sense).
*
* This function reads the current from the VND7050AJ IN1 current sense channel.
* Used for monitoring valve closing current.
*
* @return The motor closing current in milliamps (mA).
*/
uint16_t adc_sensor_get_current_close_ma(void);
#endif /* ADC_SENSOR_H */

View File

@@ -23,9 +23,13 @@ enum {
*/
REG_INPUT_VALVE_STATE_MOVEMENT = 0x0000,
/**
* @brief Aktueller Motorstrom in Milliampere (mA).
* @brief Motorstrom beim Öffnen in Milliampere (mA) - IN0 current sense.
*/
REG_INPUT_MOTOR_CURRENT_MA = 0x0001,
REG_INPUT_MOTOR_OPEN_CURRENT_MA = 0x0001,
/**
* @brief Motorstrom beim Schließen in Milliampere (mA) - IN1 current sense.
*/
REG_INPUT_MOTOR_CLOSE_CURRENT_MA = 0x0002,
/**
* @brief Bitmaske der digitalen Eingänge. Bit 0: Eingang 1, Bit 1: Eingang 2.
* 1=Aktiv.