Circuit idea for linear current control from zero amps to fixed maximum.
|¯¯¯¯¯¯¯¯¯¯¯| R1 ¡-------| LM317 T |----/\/\/\----x----x------¡ ¦ |___________| ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ x !------------¡ ¦ ¦ x ¦ VR1 ¦ _¦_C2 ¡----/\/\/\----x x R2 ¦ D1 D2 ¦ ¯¦¯ x ¦ ¡---/\/\/\---x---|