bugs / requiremens | srcfile | fix |
---|---|---|
Comment of some | PID_controller.java |
Comment of some Methods
|
A set Method for integral value is necessary to optimize control | PID_controller.java | public void setIntg(short setValue) |
Demonstrate the necessity of throw exception if the integral value of PID controller has an overflow. | PID_controller.java | (intValNew ^ intgVal ) & 0x80000000 ) == 0x80000000 ... |
Tuning of values, the normalize range of controller is -20000 to 200000, the actuator has an output range from -10000 to 10000, adaption and limitiation | MainController.java | if(yOut > 19999) ...... setMotorVoltage((short)(yOut>>1)); |
But demonstrate a difficult software error so that an exception is thrown in PID_controller | MainController.java | //pidCtrl1.setIntg(yOut); commented, than exception |
Trimming values so that the error occurs | MainEmulation.java | disturbance1 = 0.9 + 0.5*Math.sin( ... |
MainEmulation.c | mainEmulation.nAmplificationActuator = 0.45F; |
|
catch the exception also in C | MainEmulation.c |
TRY{...}_TRY ...
|
Some adaption errors in ExceptionJc | ExceptionJc.c |
|
StacktraceThreadContext.c |
|
The PID_controller should have some set methods to set
The step interval in milli- or microseconds
bugs / requiremens | srcfile | fix |
---|---|---|
Using ZBNF from Sourceforge | org/vishia/ZBNF, util, mainCmd | This sources are used as classfile zbnf.zip with sources in zbnf.srcJava.zip in the same revision as download by http://sf.net/projects/ZBNF version 0.8 This are the same files. |
The default constructor is not created in headerfile, even though in C-File | FirstPass.java | write_constructorDeclaration(null, sClassName) |
The constructors of embedded classes aren't call | ClassData.java | final String sType; in VariablesToInit |
GenerateClass.java | if(itemNewObject!=null) {...sPrefix = bEmbeddedStruct
? "$" : "@"; ...variablesToInit.add |
|
SeconcPass.java | if(sPrefix.indexOf('$') >=0) { ... writeContent.writeClassC("\n { MemC mem" |
|
Using Stacktrace as condition of using throw | Java2C/*.java |
|
SecondPass.java | class RetGenStatement to detect wether return is the last
statement |
|
SecondPass.java gen_statement() |
|
|
SecondPass.java write_constructorDefinition() write_methodDefinition() |
|
|
Using of throw to handle fatal exceptions | Java2C.zbnf |
instead |
SecondPass.java | gen_throwNew(itemStatement, localIdents) defined and used |
|
Test mem.size on ctor, throw if it is fault insufficient. | SecondPass.java write_constructorDefinition() |
|
A negativ hex number -0x1234 causes an parse exception | Java2C.zbnf | - 0x<#x?hexNumberNegative> as special alternative |
SecondPass.java | else if(sSemantic.equals("hexNumberNegative")) |