getCommandsByMaxPriority method
Get commands at or above a given priority level without removing them.
Implementation
List<QueuedCommand> getCommandsByMaxPriority(QueuePriority maxPriority) {
return _commandQueue
.where((cmd) => cmd.priority.order <= maxPriority.order)
.toList();
}