various upgrade and bug fixing for HG1410 release.
fix bugs for HG1410 release.
fixed a wrong order.
make the code easy to read
Merge pull request #411 from yuyiguo/DBS_3_2_6_pre2

Dbs 3 2 6 pre2