Return to Home Page

Pico Run-time Configuration

The Pico uses it’s flash storage to store some runtime configuration values.

Config Builder

Attributes

The Configuration System on the Pico uses a Protobuf message to serialize the configuration.

message ConfigProto {
  /** Because this makes the message variable length we need options to say this is a callback message */
  string rpiFwGitCommitHash = 1;

  bool isIbusLogOutputEnabled = 2;

  enum LoggingLevels {
    Logging_NotSet = 0; DEBUG = 1; INFO = 2; WARN = 3; ERROR = 4; WTF = 5;
  }

  LoggingLevels enabledMaxLogLevelForIbusLog = 3;
  LoggingLevels enabledMaxLogLevelForPrintfLog = 4;

  //If enabled, always turn on the Pi4 power supply when we start up.
  bool alwaysTurnOnRpiOnStatup = 5;

  //If enabled, send a packet to turn on BMBT screen
  bool alwaysTurnOnScreenOnIbusActivity = 6;

  enum ScanProgram {
    Scan_Program_NotSet = 0;
    NONE = 1;
    CLOCK = 2;
    LINSTEROS_BOOTSPLASH = 3;
    GOOSE_BOOTSPLASH = 4;
    BMW_BOOTSPLASH = 5;
    MENU = 6;
  }
  ScanProgram scanProgramOnBoot = 7;

  enum VideoSource {
      RVC = 0x0; UPSTREAM = 0x1; PICO = 0x2; PI = 0x3;
  }
  VideoSource videoSourceOnBoot = 8;



  //    https://github.com/piersholt/wilhelm-docs/blob/master/bmbt/4f.md
  bool sendBMBTEncodingPacketOnBootup = 9;
  enum VideoEncoding {
    NTSC = 0; PAL = 1;
  }

  enum AspectRatio {
    FourThree = 0; SixteenNine = 1; Zoom = 2;
  }

  VideoEncoding videoEncoding = 10;
  AspectRatio aspectRatio = 11;

}

Logging

These attributes set how chatty the pico logs are:

  bool isIbusLogOutputEnabled = 2;

  enum LoggingLevels {
    Logging_NotSet = 0; DEBUG = 1; INFO = 2; WARN = 3; ERROR = 4; WTF = 5;
  }

  LoggingLevels enabledMaxLogLevelForIbusLog = 3;
  LoggingLevels enabledMaxLogLevelForPrintfLog = 4;

They can be turned down or off at run-time to preserve bandwidth on the Ibus between the pico and the pi.

Video Encoding

Some early BMBTs need a packet sent to set their video mode correctly. https://github.com/piersholt/wilhelm-docs/blob/master/bmbt/4f.md

I haven’t had a need to use this on my car or bench setups, but I put it in here in case someone does need it.

ScanProgram

This one is a bit of an easter egg

  enum ScanProgram {
    Scan_Program_NotSet = 0;
    NONE = 1;
    CLOCK = 2;
    LINSTEROS_BOOTSPLASH = 3;
    GOOSE_BOOTSPLASH = 4;
    BMW_BOOTSPLASH = 5;
    MENU = 6;
  }
  ScanProgram scanProgramOnBoot = 7;

The LinsterOS bootsplash is the one that works the best with the menu. However, setting this to GOOSE shows my scout group’s logo. Some of the bootsplashes aren’t finished.

Return to Top