RemoteSetOutputState and OUT_BC
Brought to you by:
afanofosc,
afanofosc_99
RemoteSetOUtputState does not work when I specify ports OUT_BC. I have searched the documentation and the book "NXT Power Programming" to see if it is explicitly mentioned that only single outputs are allowed, but I have not found such a restriction. I am hestitant to report this as a bug because the last few bugs I reported were not bugs and I do not want to clog up the bug tracker.
working code similar to pp. 395-396 of "NXT Pwr Prgrming"
Not working code where I try to do it using OUT_BC and a turn_ratio
Logged In: YES
user_id=1717005
Originator: YES
File Added: fwd_bck_turn_bt_2.nxc
Look at the documentation in the NXT Bluetooth SDK that describe the SetOutputState direct command and its arguments. As implemented in the standard NXT firmware you can pass 0, 1, 2, or 0xFF as the port number. 0xFF means "set the output state of all outputs". In the enhanced NBC/NXC firmware I added support for 3 additional "special" port constants:
#define RC_PORTS_AB 0xFC
#define RC_PORTS_AC 0xFD
#define RC_PORTS_BC 0xFE
This past weekend I also added support for OUT_AB, OUT_BC, OUT_AC, and OUT_ABC (i.e., 3, 4, 5, and 6). The version of the NBC/NXC firmware with support for these port constants will not be available for a few weeks at the very least.