mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
improve E004 card generation and placeholder pcbid (#748)
## Link to GitHub Issue or related Pull Request, if one exists #73 ## Description of change Generated cards now start with E0040100 to fully match real cards. The placeholder example `E004010000000000` is replaced with `E0040100FFFFFFFF`. The invalid placeholder/fallback PCBID `04040000000000000000` is replaced with `01201000000000010101`, which contains a valid header/checksum, making it closer resemble a real PCBID while still clearly being an example.
This commit is contained in:
@@ -115,9 +115,9 @@ void generate_ea_card(char card[17]) {
|
||||
std::uniform_int_distribution<> uniform(0, 15);
|
||||
|
||||
// randomize card
|
||||
strcpy(card, "E00401");
|
||||
strcpy(card, "E0040100");
|
||||
char hex[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
|
||||
for (int i = 6; i < 16; i++) {
|
||||
for (int i = 8; i < 16; i++) {
|
||||
card[i] = hex[uniform(generator)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user