Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
fix (and test) new modern color sensor code
Browse files Browse the repository at this point in the history
Former-commit-id: 519bf151ed1d6dffc26645394ce795bdac674d31
Former-commit-id: f7c6fad
  • Loading branch information
rgatkinson committed Dec 11, 2015
1 parent 0586765 commit 4763b07
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,29 +221,31 @@ static int portOfModernColorSensor(ColorSensor sensor)
// Legacy Module
//----------------------------------------------------------------------------------------------

static I2cController.I2cPortReadyCallback[] callbacksOfLegacyModule(LegacyModule module)
static I2cController.I2cPortReadyCallback[] callbacksOfLegacyModule(LegacyModule imodule)
{
ModernRoboticsUsbLegacyModule module = (ModernRoboticsUsbLegacyModule)imodule;
return Util.<I2cController.I2cPortReadyCallback[]>getPrivateObjectField(module, 4);
}

//----------------------------------------------------------------------------------------------
// Device Interface Module
//----------------------------------------------------------------------------------------------

static I2cController.I2cPortReadyCallback[] callbacksOfDeviceInterfaceModule(DeviceInterfaceModule module)
static I2cController.I2cPortReadyCallback[] callbacksOfDeviceInterfaceModule(DeviceInterfaceModule imodule)
{
return Util.<I2cController.I2cPortReadyCallback[]>getPrivateObjectField(module, 0);
ModernRoboticsUsbDeviceInterfaceModule module = (ModernRoboticsUsbDeviceInterfaceModule)imodule;
return Util.<I2cController.I2cPortReadyCallback[]>getPrivateObjectField(module, 3);
}

//----------------------------------------------------------------------------------------------
// I2cDevice
//----------------------------------------------------------------------------------------------

public static I2cController i2cControllerOfI2cDevice(I2cDevice i2cDevice)
{
return Util.<I2cController>getPrivateObjectField(i2cDevice, 0);
}

//----------------------------------------------------------------------------------------------
// I2cDevice
//----------------------------------------------------------------------------------------------

public static int portOfI2cDevice(I2cDevice i2cDevice)
{
return Util.getPrivateIntField(i2cDevice, 1);
Expand Down

0 comments on commit 4763b07

Please sign in to comment.