mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-17 17:11:30 +10:00
Move pb string length method and fix linker error
This commit is contained in:
@@ -2,16 +2,7 @@
|
||||
#include <unity.h>
|
||||
|
||||
#include "TestUtil.h"
|
||||
|
||||
/**
|
||||
* Get actual string length for nanopb char array fields.
|
||||
* Nanopb stores strings as fixed-size char arrays that may contain embedded nulls.
|
||||
* strlen() would stop at the first null, but we need to find the last non-null character.
|
||||
* This is critical for Android UIDs that can contain 0x00 bytes (e.g., ANDROID-e7e455b40002429d).
|
||||
*
|
||||
* Use the firmware implementation declared elsewhere so tests exercise the same logic.
|
||||
*/
|
||||
extern size_t pb_string_length(const char *str, size_t max_len);
|
||||
#include "meshUtils.h"
|
||||
|
||||
void setUp(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user