private hardwareState getDiscrepancies(hardwareState oldState, hardwareState newState)
{
hardwareState state = new hardwareState();
state.analogs = new Dictionary<string, double>();
state.digitals = new Dictionary<string, bool>();
foreach(KeyValuePair<string, double> pairs in oldState.analogs)
{
if (oldState.analogs[pairs.Key] != newState.analogs[pairs.Key])
{
state.analogs[pairs.Key] = newState.analogs[pairs.Key];
}
}
foreach (KeyValuePair<string, bool> pairs in oldState.digitals)
{
if (oldState.digitals[pairs.Key] != newState.digitals[pairs.Key])
{
state.digitals[pairs.Key] = newState.digitals[pairs.Key];
}
}
return state;
}