Subversion Repositories svn.mios

Rev

Rev 1046 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1046 Rev 1177
Line 1... Line 1...
1
; $Id: mf.inc 1046 2012-04-11 20:49:46Z tk $
1
; $Id: mf.inc 1177 2014-08-10 16:15:49Z tk $
2
;
2
;
3
; Modified version of MIOS Motorfader Handler
3
; Modified version of MIOS Motorfader Handler
4
; Adapted to MBHP_MF_NG project
4
; Adapted to MBHP_MF_NG project
5
;
5
;
6
; ==========================================================================
6
; ==========================================================================
Line 275... Line 275...
275
MF_Tick_FaderEnabled
275
MF_Tick_FaderEnabled
276
276
277
	;; --- store current fader value into MF_VALUE_[LH]
277
	;; --- store current fader value into MF_VALUE_[LH]
278
	movff	ADRESL, MF_VALUE_L		; take original value from ADC so that AIN deadband doesn't matter!
278
	movff	ADRESL, MF_VALUE_L		; take original value from ADC so that AIN deadband doesn't matter!
279
	movff	ADRESH, MF_VALUE_H
279
	movff	ADRESH, MF_VALUE_H
-
 
280
-
 
281
	;; --- map via calibration table
-
 
282
	clrc
-
 
283
	rlf	MF_VALUE_L, W, BANKED
-
 
284
	movwf	TBLPTRL
-
 
285
	rlf	MF_VALUE_H, W, BANKED
-
 
286
	movwf	TBLPTRH
-
 
287
	clrf	TBLPTRU
-
 
288
-
 
289
	movlw	LOW(CAL_MOTOR_TABLE)
-
 
290
	addwf	TBLPTRL, F
-
 
291
	movlw	HIGH(CAL_MOTOR_TABLE)
-
 
292
	addwf	TBLPTRH, F
-
 
293
	tblrd*+
-
 
294
	movff	TABLAT, MF_VALUE_L
-
 
295
	tblrd*+
-
 
296
	movff	TABLAT, MF_VALUE_H
280
	
297
	
281
	;; --- store also in MF_TRACE_VALUE_[LH]?
298
	;; --- store also in MF_TRACE_VALUE_[LH]?
282
	movf	MF_TRACE_FADER, W, BANKED
299
	movf	MF_TRACE_FADER, W, BANKED
283
	xorwf	MF_NUMBER, W, BANKED
300
	xorwf	MF_NUMBER, W, BANKED
284
	bnz	MF_Tick_NotTraceFader
301
	bnz	MF_Tick_NotTraceFader