uploadSchedule function

Future<void> uploadSchedule (
  1. ConnectionInfo connectionInfo,
  2. List<List<int>> schedule
)

Uploads a schedule to the controller.

The schedule needs to be a list of 48 entries (one per half hour). Each entry should contain 5 values between 0-100 (inclusive), one for each channel.

Throws an error if the controller cannot be reached or when the schedule is invalid.

Implementation

Future<void> uploadSchedule(
    ConnectionInfo connectionInfo, List<List<int>> schedule) async {
  _validateSchedule(schedule);
  final packets = createSchedulePackets(connectionInfo.controllerId, schedule);
  await sendPackets(packets);
}