if ch3 and ch4 are the left and right wheel speeds, shouldn't a speed value (i.e. "braking") be their average?
braking2 is updated inside the block of code invoked every "interval". braking2 may have been updated just before those conditional tests (e.g. braking1 < braking2) and there may not have been much time for any speed change to occur.
if you want braking2 to represent the previous braking value, why not update them both inside the "interval" block; set braking2 to braking1 and braking1 to (ch3+ch4)/2. braking2 then represents the "braking" an "interval" before braking1 and their difference more reliably represents a change in speed.