Everything you can customize in the custom Blinklib

I realized I did not everything you can customize (per project) in the Custom Blinklib in a single place, so here they are. Adding any of them to config/blinklib_config.h will enable/disable/customize the associated feature

// Saves a considerable amount of space if your game does not use datagrams (face values 
// will still work as before)
#define BGA_CUSTOM_BLINKLIB_DISABLE_DATAGRAM

// When datagrams are enabled, allow configuring how big is the per-face datagram buffer 
// (default is 16 bytes). Setting it to the maximum size of datagram your program uses 
// reduces the amount of memory used.
#define BGA_CUSTOM_BLINKLIB_IR_DATAGRAM_LEN

// Enables blinklib-level datagram checksums. In my experience this is not required as the 
// BlinkBIOS-level checks seems to be enough. Uses more storage space when enabled. 
#define BGA_CUSTOM_BLINKLIB_ENABLE_CHECKSUM

// Enables tracking of face connection/disconnection events and resets the software and 
// hardware timers when they happen. This is for games where clicking a button is not one 
// of the main gameplay components (prevents Blinks turning off on those games when 
// pieces are being connected/disconnected).
#define BGA_CUSTOM_BLINKLIB_TRACK_FACE_CONNECTION

// Enable custom face value types. For games that would work better with more bits 
// available for face values.
#define BGA_CUSTOM_BLINKLIB_FACE_VALUE_TYPE uint16_t

// Sets the maximum time to wait without receiving any data in a face to send a probe to it. 
// You might need larger timeouts if you are dealing with big datagrams or sending 
// datagrams in multiple faces. Default value is 150 ms.
#define BGA_CUSTOM_BLINKLIB_SEND_PROBE_TIMEOUT_MS 200

// Sets the maximum time to wait without receiving any data in a face to consider it 
// expired/disconnected. Generally speaking, the value here should be bigger than the one 
// above so that more than one probe has to be missed before the face is considered 
// expired. You might need larger timeouts if you are dealing with big datagrams or sending 
// datagrams in multiple faces. Default value is 200 ms.
#define BGA_CUSTOM_BLINKLIB_FACE_EXPIRATION_TIMEOUT_MS 250
5 Likes