The main differences that occurred in Phidget 22 are:
* Objects that used to represent multiple channels (i.e an "InterfaceKit" object) are now broken up into separate objects, where each object represents one channel.
* In some cases, this also extends even further; a single channel might have multiple options of what kind of object to open it as. For example, an analog input on a 1018 can be opened as a VoltageRatioInput or VoltageInput depending on how you want to use it.
As you mentioned, there is an "
Upgrading from Phidget21 to Phidget22" page, and the new
API documentation can also help find the new naming and structure. There's also a list of channels for each device in the "API" tab on that devices' product page.
I'll run through each of the functions you mentioned:
CPhidgetTemperatureSensor_getTemperatureInputCount
This function no longer exists because the TemperatureSensor object which used to have multiple TemperatureInputs is now simply broken into a number of TemperatureSensor objects. So a 1048 now has four TemperatureSensor objects that refer to its thermocouple inputs and one TemperatureSensor object that refers to the temperature of the board (for temperature error correction). If you want to find out how many channels a Phidget has, you can use the Phidget Manager class to launch an event whenever a channel is attached. By comparing their device serial numbers, you can tell if they all belong to the same board or not.
CPhidgetTemperatureSensor_getPotentialMax
CPhidgetTemperatureSensor_getPotentialMin
"Potential" is a property that described the electrical signal (in volts) from an attached thermocouple. If you want this number, you should open the channel as a VoltageInput instead of a TemperatureSensor, and use the "getVoltage" or the Voltage change event.
CPhidgetTemperatureSensor_getAmbientTemperatureMax
CPhidgetTemperatureSensor_getAmbientTemperatureMin
Boards with ambient temperature chips on them have their own TemperatureSensor object now. This can be confusing for products like the 1048 which have their own TemperatureSensor objects already. If you go to the API tab on the product's page, you can see a list of which channel numbers refer to which objects. In the case of the 1048, TemperatureSensors 0,1,2, and 3 are the thermocouple inputs, and 4 is the ambient temperature sensor.
CPhidget_getDeviceType
DeviceType no longer exists because devices like "InterfaceKit" have been broken up into channels instead. So when plugging in a 1048 in Phidget21, you'll see a single PhidgetTemperatureSensor 4-input device connect, but in Phidget22 you'll simply see 5 TemperatureSensor objects and 4 VoltageInput objects attach. If you open up a channel, you can determine information like the channel's class, or the name of the device it belongs to with getChannelClass and getDeviceName respectively.
I doubt you'll have as much trouble with the humidity sensor, it just happens that the 1048 is the most confusing because of it's multiple types of TemperatureSensor channels.