516 lines
18 KiB
C
516 lines
18 KiB
C
/**
|
|
******************************************************************************
|
|
* @file display_status.c
|
|
* @author AMG Energy Solution Team
|
|
* @version V1.0.0
|
|
* @date 07-Feb-2022
|
|
* @brief This file provides all the codes of status display functions.
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
|
|
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
|
|
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
|
|
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
|
|
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
|
*
|
|
* <h2><center>© COPYRIGHT 2022 AMG</center></h2>
|
|
******************************************************************************
|
|
*/
|
|
|
|
/** @addtogroup mBMS2
|
|
* @{
|
|
*/
|
|
|
|
#ifdef CONSOLE_DEBUG
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include "includes.h"
|
|
#include "display_status.h"
|
|
#include "device_param.h"
|
|
#include "asutil.h"
|
|
#include "can_comm.h"
|
|
#include "delay.h"
|
|
#include "io.h"
|
|
#include "alarm.h"
|
|
|
|
/* Private typedef -----------------------------------------------------------*/
|
|
/* Private define ------------------------------------------------------------*/
|
|
/* Private macro -------------------------------------------------------------*/
|
|
/* Private variables ---------------------------------------------------------*/
|
|
/* Private function prototypes -----------------------------------------------*/
|
|
/* Private functions ---------------------------------------------------------*/
|
|
|
|
void DisplayMsg(uint16_t x, uint16_t y, uint16_t data, uint8_t bit, uint8_t *msg)
|
|
{
|
|
if ((data & BIT(bit)))
|
|
RedOutXY(x, y, msg);
|
|
else
|
|
GreenOutXY(x, y, msg);
|
|
}
|
|
|
|
void DisplayMsg1(uint16_t x, uint16_t y, uint16_t data, uint8_t bit, uint8_t *msg)
|
|
{
|
|
if ((data & BIT(bit)))
|
|
YellowOutXY(x, y, msg);
|
|
else
|
|
GreenOutXY(x, y, msg);
|
|
}
|
|
|
|
void ODisplayBatteryStatus(uint8_t p)
|
|
{
|
|
uint16_t x, y;
|
|
|
|
for (int i = 0; i < 16; i++)
|
|
{
|
|
if (p || (((dis_device_status.battery_status.value >> i) & 0x0001) != ((device_status.battery_status.value >> i) & 0x0001)))
|
|
{
|
|
x = 28 + (((15- i) % 8) * 4);
|
|
y = 3 + ((15 - i) /8);
|
|
switch (i) {
|
|
case 15: DisplayMsg(x, y, device_status.battery_status.value, 15, (uint8_t *)"ACB"); break;
|
|
case 14: DisplayMsg(x, y, device_status.battery_status.value, 14, (uint8_t *)"TCA"); break;
|
|
case 13: DisplayMsg(x, y, device_status.battery_status.value, 13, (uint8_t *)"TDA"); break;
|
|
case 12: DisplayMsg(x, y, device_status.battery_status.value, 12, (uint8_t *)"AFE"); break;
|
|
case 11: DisplayMsg(x, y, device_status.battery_status.value, 11, (uint8_t *)"CB "); break;
|
|
case 10: DisplayMsg(x, y, device_status.battery_status.value, 10, (uint8_t *)"ZVC"); break;
|
|
case 9: DisplayMsg(x, y, device_status.battery_status.value, 9, (uint8_t *)"F-C"); break;
|
|
case 8: DisplayMsg(x, y, device_status.battery_status.value, 8, (uint8_t *)"F-D"); break;
|
|
case 7: DisplayMsg(x, y, device_status.battery_status.value, 7, (uint8_t *)"INI"); break;
|
|
case 6: DisplayMsg(x, y, device_status.battery_status.value, 6, (uint8_t *)"MD "); break;
|
|
case 5: DisplayMsg(x, y, device_status.battery_status.value, 5, (uint8_t *)"FC "); break;
|
|
case 4: DisplayMsg(x, y, device_status.battery_status.value, 4, (uint8_t *)"FD "); break;
|
|
case 3: DisplayMsg(x, y, device_status.battery_status.value, 3, (uint8_t *)"RXM"); break;
|
|
case 2: DisplayMsg(x, y, device_status.battery_status.value, 2, (uint8_t *)"ZVC"); break;
|
|
case 1: DisplayMsg(x, y, device_status.battery_status.value, 1, (uint8_t *)"F-C"); break;
|
|
case 0: DisplayMsg(x, y, device_status.battery_status.value, 0, (uint8_t *)"F-D"); break;
|
|
}
|
|
}
|
|
}
|
|
dis_device_status.battery_status.value = device_status.battery_status.value;
|
|
}
|
|
|
|
void ODisplayWarningStatus(uint8_t p)
|
|
{
|
|
uint16_t x, y;
|
|
|
|
for (int i = 0; i < 16; i++)
|
|
{
|
|
if (p || (((dis_device_status.warning.value >> i) & 0x0001) != ((device_status.warning.value >> i) & 0x0001)))
|
|
{
|
|
x = 28 + (((15- i) % 8) * 4);
|
|
y = 6 + ((15 - i) /8);
|
|
switch (i) {
|
|
case 15: break;
|
|
case 14: DisplayMsg1(x, y, device_status.warning.value, 14, (uint8_t *)"CVD"); break;
|
|
case 13: break;
|
|
case 12: DisplayMsg1(x, y, device_status.warning.value, 12, (uint8_t *)"L-C"); break;
|
|
case 11: DisplayMsg1(x, y, device_status.warning.value, 11, (uint8_t *)"LTD"); break;
|
|
case 10: DisplayMsg1(x, y, device_status.warning.value, 10, (uint8_t *)"LTC"); break;
|
|
case 9: DisplayMsg1(x, y, device_status.warning.value, 9, (uint8_t *)"HTD"); break;
|
|
case 8: DisplayMsg1(x, y, device_status.warning.value, 8, (uint8_t *)"HTC"); break;
|
|
case 7: break;
|
|
case 6: break;
|
|
case 5: DisplayMsg1(x, y, device_status.warning.value, 5, (uint8_t *)"OCD"); break;
|
|
case 4: DisplayMsg1(x, y, device_status.warning.value, 4, (uint8_t *)"OCC"); break;
|
|
case 3: DisplayMsg1(x, y, device_status.warning.value, 3, (uint8_t *)"CUV"); break;
|
|
case 2: DisplayMsg1(x, y, device_status.warning.value, 2, (uint8_t *)"SUV"); break;
|
|
case 1: DisplayMsg1(x, y, device_status.warning.value, 1, (uint8_t *)"COV"); break;
|
|
case 0: DisplayMsg1(x, y, device_status.warning.value, 0, (uint8_t *)"SOV"); break;
|
|
}
|
|
}
|
|
}
|
|
dis_device_status.warning.value = device_status.warning.value;
|
|
}
|
|
|
|
void ODisplayProtectStatus(uint8_t p)
|
|
{
|
|
uint16_t x, y;
|
|
|
|
for (int i = 0; i < 16; i++)
|
|
{
|
|
if (p || (((dis_device_status.protect.value >> i) & 0x0001) != ((device_status.protect.value >> i) & 0x0001)))
|
|
{
|
|
x = 28 + (((15- i) % 8) * 4);
|
|
y = 9 + ((15 - i) /8);
|
|
switch (i) {
|
|
case 15: DisplayMsg(x, y, device_status.protect.value, 15, (uint8_t *)"AFE"); break;
|
|
case 14: DisplayMsg(x, y, device_status.protect.value, 14, (uint8_t *)"CVD"); break;
|
|
case 13: DisplayMsg(x, y, device_status.protect.value, 14, (uint8_t *)"SC "); break;
|
|
case 12: break;
|
|
case 11: DisplayMsg(x, y, device_status.protect.value, 11, (uint8_t *)"LTD"); break;
|
|
case 10: DisplayMsg(x, y, device_status.protect.value, 10, (uint8_t *)"LTC"); break;
|
|
case 9: DisplayMsg(x, y, device_status.protect.value, 9, (uint8_t *)"HTD"); break;
|
|
case 8: DisplayMsg(x, y, device_status.protect.value, 8, (uint8_t *)"HTC"); break;
|
|
case 7: break;
|
|
case 6: break;
|
|
case 5: DisplayMsg(x, y, device_status.protect.value, 5, (uint8_t *)"OCD"); break;
|
|
case 4: DisplayMsg(x, y, device_status.protect.value, 4, (uint8_t *)"OCC"); break;
|
|
case 3: DisplayMsg(x, y, device_status.protect.value, 3, (uint8_t *)"CUV"); break;
|
|
case 2: DisplayMsg(x, y, device_status.protect.value, 2, (uint8_t *)"SUV"); break;
|
|
case 1: DisplayMsg(x, y, device_status.protect.value, 1, (uint8_t *)"COV"); break;
|
|
case 0: DisplayMsg(x, y, device_status.protect.value, 0, (uint8_t *)"SOV"); break;
|
|
}
|
|
}
|
|
}
|
|
dis_device_status.protect.value = device_status.protect.value;
|
|
}
|
|
|
|
void ODisplayOperatingStatus(uint8_t p)
|
|
{
|
|
uint8_t text[20];
|
|
|
|
if (p ||(dis_device_status.op_status != device_status.op_status))
|
|
{
|
|
switch (device_status.op_status)
|
|
{
|
|
case 0: // Stand by
|
|
GreenOutXY(11, 13, (uint8_t *)"STAND BY ");
|
|
break;
|
|
case 1: // Charging
|
|
GreenOutXY(11, 13, (uint8_t *)"CHARGING ");
|
|
break;
|
|
case 2: // Discharging
|
|
GreenOutXY(11, 13, (uint8_t *)"DISCHARGING");
|
|
break;
|
|
case 3: // Float
|
|
GreenOutXY(11, 13, (uint8_t *)"FLOAT ");
|
|
break;
|
|
case 4: // Float
|
|
GreenOutXY(11, 13, (uint8_t *)"WARMING UP ");
|
|
break;
|
|
default:
|
|
sprintf((char *)text, "UNKNOWN(%d)", device_status.op_status);
|
|
GreenOutXY(11, 13, text);
|
|
break;
|
|
}
|
|
dis_device_status.op_status = device_status.op_status;
|
|
}
|
|
}
|
|
|
|
void ODisplayAlarmStatus(uint8_t p)
|
|
{
|
|
if (p ||(dis_device_status.alarm_status != device_status.alarm_status))
|
|
{
|
|
switch (device_status.alarm_status)
|
|
{
|
|
case 0: // Normal
|
|
GreenOutXY (11, 14, (uint8_t *)"NORMAL ");
|
|
break;
|
|
case 1: // Warning
|
|
YellowOutXY(11, 14, (uint8_t *)"WARNING ");
|
|
break;
|
|
case 2: // Protection
|
|
RedOutXY (11, 14, (uint8_t *)"PROTECTION");
|
|
break;
|
|
case 3: // WarmingUp
|
|
GreenOutXY (11, 14, (uint8_t *)"WARMING UP");
|
|
break;
|
|
}
|
|
dis_device_status.alarm_status = device_status.alarm_status;
|
|
}
|
|
}
|
|
|
|
void ODisplayDeviceLiveStatus(uint8_t p)
|
|
{
|
|
// Device ID
|
|
if (p)
|
|
{
|
|
float aParam = (float)GetDevAddrIO();
|
|
FloatNormalOutIntXY( 15, 2, aParam, 3, 0);
|
|
}
|
|
|
|
// Heartbeat
|
|
if (p || (dis_device_value.Heartbeat != device_value.Heartbeat))
|
|
{
|
|
float aParam = (float)device_value.Heartbeat;
|
|
FloatNormalOutIntXY( 11, 3, aParam, 7, 0);
|
|
dis_device_value.Heartbeat = device_value.Heartbeat;
|
|
}
|
|
}
|
|
|
|
void ODisplayDeviceValue(uint8_t p)
|
|
{
|
|
float aParam;
|
|
static int mcount = 0;
|
|
|
|
if (p|| (mcount == 0))
|
|
{
|
|
// Battery Voltage
|
|
if (p || (dis_device_value.BatVoltage != device_value.BatVoltage))
|
|
{
|
|
aParam = (float)device_value.BatVoltage / 100;
|
|
FloatNormalOutIntXY(12, 5, aParam, 6, 2);
|
|
dis_device_value.BatVoltage = device_value.BatVoltage;
|
|
}
|
|
// Current
|
|
if (p || (dis_device_value.Current != device_value.Current))
|
|
{
|
|
aParam = (float)device_value.Current / 10;
|
|
FloatNormalOutIntXY(12, 6, aParam, 6, 1);
|
|
dis_device_value.Current = device_value.Current;
|
|
}
|
|
// RelativeStateOfCharge
|
|
if (p || (dis_device_value.RelativeStateOfCharge != device_value.RelativeStateOfCharge))
|
|
{
|
|
aParam = (float)device_value.RelativeStateOfCharge / 10;
|
|
FloatNormalOutIntXY(13, 7, aParam, 5, 1);
|
|
dis_device_value.RelativeStateOfCharge = device_value.RelativeStateOfCharge;
|
|
}
|
|
// StateOfHealth
|
|
if (p || (dis_device_value.StateOfHealth != device_value.StateOfHealth))
|
|
{
|
|
aParam = (float)device_value.StateOfHealth / 10;
|
|
FloatNormalOutIntXY(13, 8, aParam, 5, 1);
|
|
dis_device_value.StateOfHealth = device_value.StateOfHealth;
|
|
}
|
|
// StateOfHealth
|
|
if (p || (dis_device_value.CycleCount != device_value.CycleCount))
|
|
{
|
|
aParam = (float)device_value.CycleCount / 1;
|
|
FloatNormalOutIntXY(13, 9, aParam, 5, 0);
|
|
dis_device_value.CycleCount = device_value.CycleCount;
|
|
}
|
|
// FullChargeCapacity
|
|
if (p || (dis_device_param.sbs.data.Full_Charge_Capacity != device_param.sbs.data.Full_Charge_Capacity))
|
|
{
|
|
aParam = (float)device_param.sbs.data.Full_Charge_Capacity / 100;
|
|
FloatNormalOutIntXY(13, 11, aParam, 5, 1);
|
|
dis_device_param.sbs.data.Full_Charge_Capacity = device_param.sbs.data.Full_Charge_Capacity;
|
|
}
|
|
mcount = 20;
|
|
}
|
|
mcount--;
|
|
}
|
|
|
|
void ODisplayDeviceStatus(uint8_t p)
|
|
{
|
|
uint8_t text[20];
|
|
|
|
// OP Status
|
|
ODisplayAlarmStatus(p);
|
|
ODisplayBatteryStatus(p);
|
|
ODisplayOperatingStatus(p);
|
|
|
|
// Warning Status
|
|
if (p || (dis_device_status.warning.value != device_status.warning.value))
|
|
{
|
|
ODisplayWarningStatus(true);
|
|
|
|
sprintf((char *)text, "%04X", *(uint16_t *)&device_status.warning.value);
|
|
GreenOutXY(72, 3, text);
|
|
dis_device_status.warning.value = device_status.warning.value;
|
|
}
|
|
// Protection Status
|
|
if (p || (dis_device_status.protect.value != device_status.protect.value))
|
|
{
|
|
ODisplayProtectStatus(true);
|
|
|
|
sprintf((char *)text, "%04X", *(uint16_t *)&device_status.protect.value);
|
|
GreenOutXY(72, 4, text);
|
|
dis_device_status.protect.value = device_status.protect.value;
|
|
}
|
|
|
|
static uint8_t disSleepMode = 0;
|
|
|
|
if (p || (disSleepMode != GetSleepMode()))
|
|
{
|
|
switch (GetSleepMode())
|
|
{
|
|
case 0: // Normal
|
|
GreenOutXY (53, 16, (uint8_t *)"NORM ");
|
|
break;
|
|
case 1: // Sleep
|
|
RedOutXY (53, 16, (uint8_t *)"SLEEP");
|
|
break;
|
|
case 2: // Deep Sleep
|
|
RedOutXY (53, 16, (uint8_t *)"DEEPS");
|
|
break;
|
|
}
|
|
disSleepMode = GetSleepMode();
|
|
}
|
|
}
|
|
|
|
void ODisplayCellStatus(uint8_t p)
|
|
{
|
|
uint16_t i, x, y;
|
|
float aParam;
|
|
static int vcount = 10; //DEVICE_MAX_CELL;
|
|
|
|
if (p || (vcount == 0))
|
|
{
|
|
for (i = 0; i < DEVICE_MAX_CELL; i++)
|
|
{
|
|
x = 3 + ((i / 5)* 7);
|
|
y = 17 + (i % 5);
|
|
|
|
if (p ||(dis_device_value.Cell.voltage[i] != device_value.Cell.voltage[i])
|
|
||((dis_device_status.cellbalance.value >> i)& 0x0001) != ((device_status.cellbalance.value >> i)& 0x0001))
|
|
{
|
|
aParam = (float)device_value.Cell.voltage[i] / 1000;
|
|
FloatColorOutIntXY(DISPLAY_GREEN, x, y, aParam, 5, 3);
|
|
if ((device_status.cellbalance.value >> i)& 0x0001)
|
|
FloatColorOutIntXY(DISPLAY_YELLOW, x, y, aParam, 5, 3);
|
|
else
|
|
FloatColorOutIntXY(DISPLAY_GREEN, x, y, aParam, 5, 3);
|
|
|
|
dis_device_value.Cell.voltage[i] = device_value.Cell.voltage[i];
|
|
}
|
|
}
|
|
dis_device_status.cellbalance.value = device_status.cellbalance.value;
|
|
vcount = 10;
|
|
}
|
|
vcount--;
|
|
}
|
|
|
|
void ODisplayCellStatus1(uint8_t p)
|
|
{
|
|
uint16_t i, x, y;
|
|
float aParam;
|
|
static int vch = 0; //DEVICE_MAX_CELL;
|
|
|
|
i = vch;
|
|
x = 3 + ((i / 5)* 7);
|
|
y = 17 + (i % 5);
|
|
|
|
if (p ||(dis_device_value.Cell.voltage[i] != device_value.Cell.voltage[i])
|
|
||((dis_device_status.cellbalance.value >> i)& 0x0001) != ((device_status.cellbalance.value >> i)& 0x0001))
|
|
{
|
|
aParam = (float)device_value.Cell.voltage[i] / 1000;
|
|
FloatColorOutIntXY(DISPLAY_GREEN, x, y, aParam, 5, 3);
|
|
if ((device_status.cellbalance.value >> i)& 0x0001)
|
|
FloatColorOutIntXY(DISPLAY_YELLOW, x, y, aParam, 5, 3);
|
|
else
|
|
FloatColorOutIntXY(DISPLAY_GREEN, x, y, aParam, 5, 3);
|
|
|
|
dis_device_value.Cell.voltage[i] = device_value.Cell.voltage[i];
|
|
}
|
|
vch++;
|
|
if (vch >= DEVICE_MAX_CELL)
|
|
{
|
|
dis_device_status.cellbalance.value = device_status.cellbalance.value;
|
|
vch %= DEVICE_MAX_CELL;
|
|
}
|
|
}
|
|
|
|
void ODisplayAvgValue(uint8_t p)
|
|
{
|
|
float aParam;
|
|
|
|
// Cell Voltage Max, Min, Avg
|
|
if (p || (dis_device_value.Cell.avg.Max.value != device_value.Cell.avg.Max.value)) {
|
|
aParam = (float)device_value.Cell.avg.Max.value / 1000;
|
|
FloatNormalOutIntXY(71, 6 , aParam, 5, 3);
|
|
dis_device_value.Cell.avg.Max.value = device_value.Cell.avg.Max.value;
|
|
}
|
|
if (p || (dis_device_value.Cell.avg.avg != device_value.Cell.avg.avg)) {
|
|
aParam = (float)device_value.Cell.avg.avg / 1000;
|
|
FloatNormalOutIntXY(71, 7 , aParam, 5, 3);
|
|
dis_device_value.Cell.avg.avg = device_value.Cell.avg.avg;
|
|
}
|
|
if (p || (dis_device_value.Cell.avg.Min.value != device_value.Cell.avg.Min.value)) {
|
|
aParam = (float)device_value.Cell.avg.Min.value / 1000;
|
|
FloatNormalOutIntXY(71, 8 , aParam, 5, 3);
|
|
dis_device_value.Cell.avg.Min.value = device_value.Cell.avg.Min.value;
|
|
}
|
|
if (p || (dis_device_value.Cell.avg.diff != device_value.Cell.avg.diff)) {
|
|
aParam = (float)device_value.Cell.avg.diff / 1000;
|
|
FloatNormalOutIntXY(71, 9 , aParam, 5, 3);
|
|
dis_device_value.Cell.avg.diff = device_value.Cell.avg.diff;
|
|
}
|
|
// Temp Max, Min, Avg
|
|
if (p || (dis_device_value.Temp.avg.Max.value != device_value.Temp.avg.Max.value))
|
|
{
|
|
aParam = (float)device_value.Temp.avg.Max.value / 10;
|
|
FloatNormalOutIntXY(71, 13, aParam, 5, 1);
|
|
|
|
dis_device_value.Temp.avg.Max.value = device_value.Temp.avg.Max.value;
|
|
}
|
|
if (p || (dis_device_value.Temp.avg.avg != device_value.Temp.avg.avg))
|
|
{
|
|
aParam = (float)device_value.Temp.avg.avg / 10;
|
|
FloatNormalOutIntXY(71, 14, aParam, 5, 1);
|
|
|
|
dis_device_value.Temp.avg.avg = device_value.Temp.avg.avg;
|
|
}
|
|
if (p || (dis_device_value.Temp.avg.Min.value != device_value.Temp.avg.Min.value))
|
|
{
|
|
aParam = (float)device_value.Temp.avg.Min.value / 10;
|
|
FloatNormalOutIntXY(71, 15, aParam, 5, 1);
|
|
|
|
dis_device_value.Temp.avg.Min.value = device_value.Temp.avg.Min.value;
|
|
}
|
|
if (p || (dis_device_value.Temp.avg.diff != device_value.Temp.avg.diff))
|
|
{
|
|
aParam = (float)device_value.Temp.avg.diff / 10;
|
|
FloatNormalOutIntXY(71, 16, aParam, 5, 1);
|
|
|
|
dis_device_value.Temp.avg.diff = device_value.Temp.avg.diff;
|
|
}
|
|
}
|
|
|
|
void ODisplayDevice(uint8_t p)
|
|
{
|
|
ODisplayDeviceLiveStatus(p);
|
|
ODisplayDeviceStatus(p);
|
|
ODisplayDeviceValue(p);
|
|
ODisplayCellStatus(p);
|
|
ODisplayAvgValue(p);
|
|
}
|
|
|
|
void SDisplayInfo(uint8_t p)
|
|
{
|
|
uint8_t text[20];
|
|
|
|
// Manufacturer Name Size
|
|
if (p || (dis_device_param.info.ManufacturerNameSize != device_param.info.ManufacturerNameSize))
|
|
{
|
|
sprintf((char *)text, "%2d", device_param.info.ManufacturerNameSize);
|
|
GreenOutXY(64, 18, text);
|
|
dis_device_param.info.ManufacturerNameSize = device_param.info.ManufacturerNameSize;
|
|
}
|
|
// Manufacturer Name
|
|
if (p || (memcmp(dis_device_param.info.ManufacturerName, device_param.info.ManufacturerName, 11) != 0))
|
|
{
|
|
memcpy(text, device_param.info.ManufacturerName, 11);
|
|
text[11] = 0x00;
|
|
GreenOutXY(68, 18, text);
|
|
memcpy(dis_device_param.info.ManufacturerName, device_param.info.ManufacturerName, 11);
|
|
}
|
|
// Device Name Size
|
|
if (p || (dis_device_param.info.DeviceNameSize != device_param.info.DeviceNameSize))
|
|
{
|
|
sprintf((char *)text, "%2d", device_param.info.DeviceNameSize);
|
|
GreenOutXY(64, 19, text);
|
|
dis_device_param.info.DeviceNameSize = device_param.info.DeviceNameSize;
|
|
}
|
|
// Device Name
|
|
if (p || (memcmp(dis_device_param.info.DeviceName, device_param.info.DeviceName, 7) != 0))
|
|
{
|
|
memcpy(text, device_param.info.DeviceName, 7);
|
|
text[7] = 0x00;
|
|
GreenOutXY(68, 19, text);
|
|
memcpy(dis_device_param.info.DeviceName, device_param.info.DeviceName, 7);
|
|
}
|
|
// Device Chemistry Size
|
|
if (p || (dis_device_param.info.DeviceChemistrySize != device_param.info.DeviceChemistrySize))
|
|
{
|
|
sprintf((char *)text, "%2d", device_param.info.DeviceChemistrySize);
|
|
GreenOutXY(64, 20, text);
|
|
dis_device_param.info.DeviceChemistrySize = device_param.info.DeviceChemistrySize;
|
|
}
|
|
// Device Chemistry
|
|
if (p || (memcmp(dis_device_param.info.DeviceChemistry, device_param.info.DeviceChemistry, 4) != 0))
|
|
{
|
|
memcpy(text, device_param.info.DeviceChemistry, 4);
|
|
text[4] = 0x00;
|
|
GreenOutXY(68, 20, text);
|
|
memcpy(dis_device_param.info.DeviceChemistry, device_param.info.DeviceChemistry, 4);
|
|
}
|
|
}
|
|
|
|
#endif // #ifdef CONSOLE_DEBUG
|
|
|
|
/*******************(C)COPYRIGHT 2022 AMG ********************END OF FILE******/
|