If the defendant consents in writing to a waiver of hearing, counsel may waive the hearing upon proper notice to the court.