mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-17 07:41:52 +01:00
Introduce several const statements
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (C) 2022 Thomas Basler and others
|
||||
* Copyright (C) 2022-2023 Thomas Basler and others
|
||||
*/
|
||||
#include "RealTimeRunDataCommand.h"
|
||||
#include "Hoymiles.h"
|
||||
@@ -29,8 +29,8 @@ bool RealTimeRunDataCommand::handleResponse(InverterAbstract* inverter, fragment
|
||||
// Check if at least all required bytes are received
|
||||
// In case of low power in the inverter it occours that some incomplete fragments
|
||||
// with a valid CRC are received.
|
||||
uint8_t fragmentsSize = getTotalFragmentSize(fragment, max_fragment_id);
|
||||
uint8_t expectedSize = inverter->Statistics()->getExpectedByteCount();
|
||||
const uint8_t fragmentsSize = getTotalFragmentSize(fragment, max_fragment_id);
|
||||
const uint8_t expectedSize = inverter->Statistics()->getExpectedByteCount();
|
||||
if (fragmentsSize < expectedSize) {
|
||||
Hoymiles.getMessageOutput()->printf("ERROR in %s: Received fragment size: %d, min expected size: %d\r\n",
|
||||
getCommandName().c_str(), fragmentsSize, expectedSize);
|
||||
|
||||
Reference in New Issue
Block a user