Loginskip to content

January 29th, 2007

NXC Beta 24

I released beta 24 of NBC and NXC early this morning.  The source code, the Win32 binary and the Linux binary are all up on the NBC site.  The Mac OSX build will be up later this evening.  I’m nearly ready to post the first draft of the NXC Guide as well.

Be sure to also get the latest test release of BricxCC for updated syntax highlighting support for the newly added API functions in NBC and NXC.

Read on for a list of fixes and enhancements.

Version 1.0.1.b24
—————–
- Fixes a preprocessor bug in NBC and NXC that is triggered by not having a ‘)’
  at the end of a macro invocation (or anywhere following in the entire program).
- Replaced the ResetMotor macros in NBC and NXC with the following macros:
    ResetTachoCount(p)
    ResetBlockTachoCount(p)
    ResetRotationCount(p)
    ResetAllTachoCounts(p)
- Added NBC API file i/o macros
    Read(handle, n, result)
    ReadLn(handle, n, result)
    ReadBytes(handle, len, buf, result)
    Write(handle, n, result)
    WriteLn(handle, n, result)
    WriteString(handle, str, cnt, result)
    WriteLnString(handle, str, cnt, result)
    WriteBytes(handle, buf, cnt, result)
    WriteBytesEx(handle, len, buf, result)
- Added NXC API file i/o macros
    result = Read(handle, n)
    result = ReadLn(handle, n)
    result = ReadBytes(handle, len, buf)
    result = Write(handle, n)
    result = WriteLn(handle, n)
    result = WriteString(handle, str, cnt)
    result = WriteLnString(handle, str, cnt)
    result = WriteBytes(handle, buf, cnt)
    result = WriteBytesEx(handle, len, buf)
- Replaced the code underlying the ReadSensorUS (NBC) and SensorUS (NXC) API
  functions with a version which appears to be more reliable (and generic).
- Added NBC and NXC API functions to give control over reseting rotation counters
    CoastEx(ports, reset)
    OffEx(ports, reset)
    OnFwdEx(ports, pwr, reset)
    OnRevEx(ports, pwr, reset)
    OnFwdRegEx(ports, pwr, regmode, reset)
    OnRevRegEx(ports, pwr, regmode, reset)
    OnFwdSyncEx(ports, pwr, turnpct, reset)
    OnRevSyncEx(ports, pwr, turnpct, reset)
- Added NBC and NXC constants for the “Ex” motor functions
    RESET_NONE
    RESET_COUNT
    RESET_BLOCK_COUNT
    RESET_ROTATION_COUNT
    RESET_BLOCKANDTACHO
    RESET_ALL
- Added NBC and NXC API functions which expose the PID parameters
    RotateMotorPID(ports, pwr, angle, p, i, d)
    RotateMotorExPID(ports, pwr, angle, turnpct, bsync, p, i, d)
- Added NBC and NXC API function for clearing the screen
    ClearScreen()
- Added support in the NXC SetOutput function for multiple sets of field/value pairs
    SetOutput(ports, const field1, value1, …, const fieldN, valueN)
- Added generic I2C read/write routine for NBC
    ReadI2CBytes(port, inbuf, count, outbuf, result)
- Added generic I2C read/write routine for NXC
    result = I2CBytes(port, inbuf, count, outbuf)
- Added NBC pseudo opcode to spawn a thread anywhere within the current thread
    start TaskName
- Added NXC start statement (ala NQC)
    start TaskName;