Базово всё запущено. Датчики считываются записываются в модбас регистры, и по запросу выдаются.
Есть запас на 27-30 датчиков
This commit is contained in:
@@ -459,7 +459,9 @@ HAL_StatusTypeDef Dallas_ReadTemperature(DALLAS_SensorHandleTypeDef *sensor)
|
||||
/* Ïðîâåðêà ïðèñóòñòâóåò ëè âûáðàííûé äàò÷èê íà ëèíèè */
|
||||
result = Dallas_IsConnected(sensor);
|
||||
if (result != HAL_OK)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
result = DS18B20_CalcTemperature(sensor->hdallas->onewire, (uint8_t *)&sensor->sensROM, (uint8_t *)&sensor->hdallas->scratchpad, &sensor->temperature);
|
||||
@@ -495,7 +497,7 @@ HAL_StatusTypeDef Dallas_IsConnected(DALLAS_SensorHandleTypeDef *sensor)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
sensor->temperature = 0;
|
||||
if(sensor->isConnected == 1)
|
||||
{
|
||||
sensor->f.disconnect_cnt++;
|
||||
|
||||
Reference in New Issue
Block a user