Re: New BricxCC and NBC/NXC release
Posted: 19 Mar 2011, 04:23
I seem to be able to open it perfectly with the release from last summer (3.3.8.7). However, this program won't open without crashing that release.I have the programs saved as .nqc files. When I go to open a program, the default type is NXC, so I have to click on the dropdown menu and select NQC. Yes I did recently change to tabbed mode. Should I switch back to MDI and see what happens?
Code: Select all
#define SHORT_WAIT 3 //short wait for value to stabilize
int A,B,C,E,AF,BF,CF,EF,Final; //global
task main()
{
SetUserDisplay (Final,0);
SetSensor (SENSOR_1, SENSOR_TOUCH);
Wait (100);
SetSensor(SENSOR_1, SENSOR_LIGHT); //power on sensor by making it light type
SetSensorType (SENSOR_2, SENSOR_TYPE_TOUCH);
while (true) //loop forever
{
if (SENSOR_1== 100)
{
SetSensor(SENSOR_1, SENSOR_TOUCH);
SetSensor(SENSOR_1, SENSOR_LIGHT);
Wait(SHORT_WAIT);
}
A = SENSOR_1*1; //read the A and scale by 1
SetSensor(SENSOR_1, SENSOR_TOUCH); //toggle power to change to channel 2
SetSensor(SENSOR_1, SENSOR_LIGHT);
Wait(SHORT_WAIT);
B = SENSOR_1*1; //read the B and scale by 1
SetSensor(SENSOR_1, SENSOR_TOUCH); //toggle power to change to channel 3
SetSensor(SENSOR_1, SENSOR_LIGHT);
Wait(SHORT_WAIT);
C = SENSOR_1*1; //read the C and scale by 1
SetSensor(SENSOR_1, SENSOR_TOUCH); //toggle power to change to channel 0
SetSensor(SENSOR_1, SENSOR_LIGHT);
if (A == 0) { AF = 0; }
else{ AF = 1; }
if (B == 0) { BF = 0; }
else { BF = 10; }
if (C == 0) { CF = 0; }
else{ CF = 100; }
EF = 1000;
Final = AF + BF + CF + EF;
}
}