summaryrefslogtreecommitdiff
path: root/src/ao-make-product.5c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ao-make-product.5c')
-rw-r--r--src/ao-make-product.5c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ao-make-product.5c b/src/ao-make-product.5c
index 933032dd..5f2eb8e8 100644
--- a/src/ao-make-product.5c
+++ b/src/ao-make-product.5c
@@ -37,11 +37,19 @@ write_int(int a, string description)
printf ("#define AO_%s_NUMBER %d\n\n", description, a);
}
+void
+write_hex(int a, string description)
+{
+ printf ("/* %s */\n", description);
+ printf ("#define AO_%s_NUMBER 0x%04x\n\n", description, a);
+}
+
string manufacturer = "altusmetrum.org";
string product = "TeleMetrum";
string version = "0.0";
int serial = 1;
int user_argind = 0;
+int id_product = 0x000a;
argdesc argd = {
.args = {
@@ -58,6 +66,12 @@ argdesc argd = {
.expr_name = "prod",
.desc = "Product name." },
{
+ .var = { .arg_int = &id_product },
+ .abbr = 'i',
+ .name = "id_product",
+ .expr_name = "id_p",
+ .desc = "Product ID." },
+ {
.var = { .arg_int = &serial },
.abbr = 's',
.name = "serial",
@@ -82,6 +96,7 @@ main()
write_ucs2(product, "iProduct");
write_ucs2(sprintf("%06d", serial), "iSerial");
write_int(serial, "iSerial");
+ write_hex(id_product, "idProduct");
write_string(version, "iVersion");
}