Add LV status field
This commit is contained in:
		@ -5,7 +5,7 @@
 | 
			
		||||
#include "touchgfx/hal/Types.hpp"
 | 
			
		||||
#include <gui_generated/containers/DriverViewStatusItemBase.hpp>
 | 
			
		||||
 | 
			
		||||
enum class DriverViewStatusType { TS_R2D, AMS, SDC, SCS, PDU, INV };
 | 
			
		||||
enum class DriverViewStatusType { TS_R2D, AMS, SDC, SCS, PDU, INV, LV };
 | 
			
		||||
 | 
			
		||||
class DriverViewStatusItem : public DriverViewStatusItemBase {
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
@ -57,6 +57,11 @@ void DriverViewStatusItem::update() {
 | 
			
		||||
      bg.setColor(COLOR_OFF);
 | 
			
		||||
    }
 | 
			
		||||
    break;
 | 
			
		||||
  case DriverViewStatusType::LV:
 | 
			
		||||
    text.setTypedText(T_LV);
 | 
			
		||||
    // TODO: Set color based on LV SoC
 | 
			
		||||
    bg.setColor(COLOR_OFF);
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
  text.invalidate();
 | 
			
		||||
  bg.invalidate();
 | 
			
		||||
 | 
			
		||||
@ -25,6 +25,7 @@ void DriverViewView::setupScreen() {
 | 
			
		||||
  statusSCS.setType(DriverViewStatusType::SCS);
 | 
			
		||||
  statusPDU.setType(DriverViewStatusType::PDU);
 | 
			
		||||
  statusINV.setType(DriverViewStatusType::INV);
 | 
			
		||||
  statusLV.setType(DriverViewStatusType::LV);
 | 
			
		||||
  fieldTypeSelection.setNumberOfItems(DataFieldType_COUNT);
 | 
			
		||||
  // int tireThresholds[4] = {35, 40, 50, 60};
 | 
			
		||||
  // tireTempFL.setTempThresholds(tireThresholds);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user