Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I send a command to APCs Via mechcomp
#1
Post transfered directly from the discord question segment cause I didn't get an answer

how to I send a message via mechcomp to apcs, I've been having a lot of issues because...

1) when I use aa button component to send data to the pnet component, the pnet changes all the ; into &, which is normally fine, but using the apc connections they need to be separate
2) the packet sniffer changes them all back to ; which was just confusing
3) to add to confusion while the button panels change all & to & (pnet don't like that combination) regular buttons change & back to just &

sorry, this might have been a little bit of a rant and a little bit asking for help
Reply
#2
(03-07-2025, 11:50 AM)Mikeistaken Wrote: 1) when I use aa button component to send data to the pnet component, the pnet changes all the ; into &, which is normally fine, but using the apc connections they need to be separate
If I remember correctly, the way to get around the ampersand being converted was to use a URL encoded pattern for the &, which is: %26

So in the APC example on the wiki:

Code:
sender=02003c12;address_1=02006754;command=term_message;data=command=setmode&light=0&environ=0;

...becomes (by replacing all & with %26)

Code:
sender=02003c12;address_1=02006754;command=term_message;data=command=setmode%26light=0%26environ=0;
Reply
#3
Hmm, that seems logical, so I'll give it a shot when I get the chance, thanks for trying help

EDIT: I do also have a mild complaint that the networks and components are not standardized with each other and I'd like to perhaps see one day a fix for it
Reply
#4
Actually, I think the %26 method is obsolete, as characters can now be escaped with a backslash; so you can replace %26 with \&
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)