If the condition exists where a schedule has an active cell followed by one or more "sleep" cells, an incorrect radio channel will be selected for the active cell.
The problem is that the ASN offset is incremented prior to radio channel selection for that cell which happens later.
Some possible solutions maybe:
Select and set the radio frequency in activity_ti1ORri1() prior to incrementing the asnoffset. This assumes the channel wouldn't need to change for the current active cell after that.
Handle the asnoffset maintenance in endSlot()