7 junio 2011

Función SpeedCurve en Rocrail no aprobada

Category: Rocrail — Manolo @ 23:56

Aún no sé porque – no me han dado ninguna explicación – pero la contribución del speedcurve no ha sido aceptada por el administrador de Rocrail.
A la espera de más información – al menos me gustaría que me dijeran porqué la rechazan – he compilado un paquete basado en la rev 2631:

rocrail-setup-2.0.0-SpeedCurve-rev2631-win32.

Esta solución debería solucionar el problema de pérdida de memoria que describía en el anterior post. Los nuevos ficheros fuente (speedr).

La contribución no se va a incluir en la distribución oficial porque «sólo es útil para decoders de bajo coste que se pueden substituir por poco dinero» . Yo seguiré actualizando esta versión para uso propio, así que si alguien la quiere, sólo tiene que pedirla :).

5 junio 2011

Función Speedcurve en Rocrail

Category: Rocrail — Manolo @ 22:04
Este fin de semana he mandado a la gente de Rocrail una contribución para añadir una funcionalidad a Rocrail. Se trata de la capacidad de tener una curva de velocidad que se gestiona desde el ordenador.
La documentación está en Inglés:

Finally I have had some time to implement the functionality I was requesting. I am attaching an explanation on what the motivation was, and how it can be used.
Since I am not at all an expert on C, neither on the rocrail code, it has taken me longer than expected. Moreover, there is still a problem with the code – a memory leak – I have not been able to solve. I think it is in the way I am attaching the speedcurve parameters to the loc command (loc.c file)… but I am not sure – any help, correction and suggestion for improvement is very welcome.
Basically I have modified the wrapper description file to include a new property to the loc (speedcurve). Then I have modified the loc.c file to explore if a locomotive has this property and include them in the commands sent to the stations. Finally, in DDX, this parameter is treated in MM locomotives.
The reason to address only MM is basically because DCC decoders use to have an actual speedcurve functionality. In any case, since the information is transmitted to any station, anyone could make use of it to implement the speedcurve as I have made for DDX MM.
Hope this new feature to be of interest. It needs still some refinement for the memory leak.. but hopefully someone could give me a hint on how to solve it, so it can be included in a stable release – if it is of interest of course.
I am attaching the three source code files modified, a plan example and the explanation of the functionality.

(more…)