aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c
blob: 659a308dbe73367826d3809bb42261bf66f87dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
mkdir include
mkdir include\google
mkdir include\google\protobuf
mkdir include\google\protobuf\compiler
mkdir include\google\protobuf\compiler\cpp
mkdir include\google\protobuf\compiler\csharp
mkdir include\google\protobuf\compiler\java
mkdir include\google\protobuf\compiler\javanano
mkdir include\google\protobuf\compiler\js
mkdir include\google\protobuf\compiler\objectivec
mkdir include\google\protobuf\compiler\php
mkdir include\google\protobuf\compiler\python
mkdir include\google\protobuf\compiler\ruby
mkdir include\google\protobuf\io
mkdir include\google\protobuf\stubs
mkdir include\google\protobuf\util
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\any.h" include\google\protobuf\any.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\any.pb.h" include\google\protobuf\any.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\api.pb.h" include\google\protobuf\api.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\arena.h" include\google\protobuf\arena.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\arena_impl.h" include\google\protobuf\arena_impl.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\arenastring.h" include\google\protobuf\arenastring.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\code_generator.h" include\google\protobuf\compiler\code_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\command_line_interface.h" include\google\protobuf\compiler\command_line_interface.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\cpp\cpp_generator.h" include\google\protobuf\compiler\cpp\cpp_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\csharp\csharp_generator.h" include\google\protobuf\compiler\csharp\csharp_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\csharp\csharp_names.h" include\google\protobuf\compiler\csharp\csharp_names.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\importer.h" include\google\protobuf\compiler\importer.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\java\java_generator.h" include\google\protobuf\compiler\java\java_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\java\java_names.h" include\google\protobuf\compiler\java\java_names.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\javanano\javanano_generator.h" include\google\protobuf\compiler\javanano\javanano_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\js\js_generator.h" include\google\protobuf\compiler\js\js_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\js\well_known_types_embed.h" include\google\protobuf\compiler\js\well_known_types_embed.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\objectivec\objectivec_generator.h" include\google\protobuf\compiler\objectivec\objectivec_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\objectivec\objectivec_helpers.h" include\google\protobuf\compiler\objectivec\objectivec_helpers.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\parser.h" include\google\protobuf\compiler\parser.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\php\php_generator.h" include\google\protobuf\compiler\php\php_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\plugin.h" include\google\protobuf\compiler\plugin.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\plugin.pb.h" include\google\protobuf\compiler\plugin.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\python\python_generator.h" include\google\protobuf\compiler\python\python_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\compiler\ruby\ruby_generator.h" include\google\protobuf\compiler\ruby\ruby_generator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\descriptor.h" include\google\protobuf\descriptor.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\descriptor.pb.h" include\google\protobuf\descriptor.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\descriptor_database.h" include\google\protobuf\descriptor_database.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\duration.pb.h" include\google\protobuf\duration.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\dynamic_message.h" include\google\protobuf\dynamic_message.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\empty.pb.h" include\google\protobuf\empty.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\extension_set.h" include\google\protobuf\extension_set.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\field_mask.pb.h" include\google\protobuf\field_mask.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\generated_enum_reflection.h" include\google\protobuf\generated_enum_reflection.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\generated_enum_util.h" include\google\protobuf\generated_enum_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\generated_message_reflection.h" include\google\protobuf\generated_message_reflection.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\generated_message_table_driven.h" include\google\protobuf\generated_message_table_driven.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\generated_message_util.h" include\google\protobuf\generated_message_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\has_bits.h" include\google\protobuf\has_bits.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\gzip_stream.h" include\google\protobuf\io\gzip_stream.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\printer.h" include\google\protobuf\io\printer.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\strtod.h" include\google\protobuf\io\strtod.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\tokenizer.h" include\google\protobuf\io\tokenizer.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\zero_copy_stream.h" include\google\protobuf\io\zero_copy_stream.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\zero_copy_stream_impl.h" include\google\protobuf\io\zero_copy_stream_impl.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\io\zero_copy_stream_impl_lite.h" include\google\protobuf\io\zero_copy_stream_impl_lite.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\map.h" include\google\protobuf\map.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\map_entry.h" include\google\protobuf\map_entry.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\map_entry_lite.h" include\google\protobuf\map_entry_lite.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\map_field.h" include\google\protobuf\map_field.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\map_field_inl.h" include\google\protobuf\map_field_inl.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\map_field_lite.h" include\google\protobuf\map_field_lite.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\map_type_handler.h" include\google\protobuf\map_type_handler.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\message.h" include\google\protobuf\message.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\message_lite.h" include\google\protobuf\message_lite.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\metadata.h" include\google\protobuf\metadata.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\metadata_lite.h" include\google\protobuf\metadata_lite.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\reflection.h" include\google\protobuf\reflection.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\reflection_ops.h" include\google\protobuf\reflection_ops.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\repeated_field.h" include\google\protobuf\repeated_field.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\service.h" include\google\protobuf\service.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\source_context.pb.h" include\google\protobuf\source_context.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\struct.pb.h" include\google\protobuf\struct.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomic_sequence_num.h" include\google\protobuf\stubs\atomic_sequence_num.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops.h" include\google\protobuf\stubs\atomicops.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_arm64_gcc.h" include\google\protobuf\stubs\atomicops_internals_arm64_gcc.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h" include\google\protobuf\stubs\atomicops_internals_arm_gcc.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h" include\google\protobuf\stubs\atomicops_internals_arm_qnx.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h" include\google\protobuf\stubs\atomicops_internals_atomicword_compat.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_generic_c11_atomic.h" include\google\protobuf\stubs\atomicops_internals_generic_c11_atomic.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_generic_gcc.h" include\google\protobuf\stubs\atomicops_internals_generic_gcc.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h" include\google\protobuf\stubs\atomicops_internals_mips_gcc.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_power.h" include\google\protobuf\stubs\atomicops_internals_power.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_ppc_gcc.h" include\google\protobuf\stubs\atomicops_internals_ppc_gcc.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_solaris.h" include\google\protobuf\stubs\atomicops_internals_solaris.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_tsan.h" include\google\protobuf\stubs\atomicops_internals_tsan.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h" include\google\protobuf\stubs\atomicops_internals_x86_gcc.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h" include\google\protobuf\stubs\atomicops_internals_x86_msvc.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\bytestream.h" include\google\protobuf\stubs\bytestream.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\callback.h" include\google\protobuf\stubs\callback.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\casts.h" include\google\protobuf\stubs\casts.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\once.h" include\google\protobuf\stubs\once.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\platform_macros.h" include\google\protobuf\stubs\platform_macros.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\port.h" include\google\protobuf\stubs\port.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\scoped_ptr.h" include\google\protobuf\stubs\scoped_ptr.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\shared_ptr.h" include\google\protobuf\stubs\shared_ptr.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\singleton.h" include\google\protobuf\stubs\singleton.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\status.h" include\google\protobuf\stubs\status.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\stl_util.h" include\google\protobuf\stubs\stl_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\stringpiece.h" include\google\protobuf\stubs\stringpiece.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\template_util.h" include\google\protobuf\stubs\template_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\stubs\type_traits.h" include\google\protobuf\stubs\type_traits.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\text_format.h" include\google\protobuf\text_format.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\timestamp.pb.h" include\google\protobuf\timestamp.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\type.pb.h" include\google\protobuf\type.pb.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\unknown_field_set.h" include\google\protobuf\unknown_field_set.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\delimited_message_util.h" include\google\protobuf\util\delimited_message_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\field_comparator.h" include\google\protobuf\util\field_comparator.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\field_mask_util.h" include\google\protobuf\util\field_mask_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\json_util.h" include\google\protobuf\util\json_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\message_differencer.h" include\google\protobuf\util\message_differencer.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\time_util.h" include\google\protobuf\util\time_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\type_resolver.h" include\google\protobuf\util\type_resolver.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\util\type_resolver_util.h" include\google\protobuf\util\type_resolver_util.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\wire_format.h" include\google\protobuf\wire_format.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\wire_format_lite.h" include\google\protobuf\wire_format_lite.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\wire_format_lite_inl.h" include\google\protobuf\wire_format_lite_inl.h
copy "C:\protobuf\protobuf-3.4.1\cmake\..\src\google\protobuf\wrappers.pb.h" include\google\protobuf\wrappers.pb.h
ef='#n961'>961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428
#include <Container.h>
#include <PMR/Common/MessageContainer.pb-c.h>
#include <PMR/Stubs/ProgressRequest.pb-c.h>
#include <PMR/Stubs/ProgressResponse.pb-c.h>
#include "include.h"
#include "driverlib/gpio.h"

#include "Communication/Connection.h"

#include "Drivers/USB_Communication/USBCDCD.h"
#include "drivers/Flash_Memory/FATFS/ff.h"
#include "drivers/Flash_Memory/FATFS/Control_File_System.h"
#include "drivers/Flash_ram/FlashProgram.h"
#include "drivers/adc_sampling/adc.h"
#include "drivers/Heater/TemperatureSensor.h"
#include "drivers/ADC_Sampling/adc.h"
#include "drivers/Flash_ram/MCU_E2Prom.h"
#include "Drivers/SSI_Comm/Dancer/Dancer.h"
#include "Drivers/I2C_Communication/Head_Card/PT100/Head_PT100_ADC.h"
#include "Drivers/I2C_Communication/Head_Card/Fan/fan_click.h"
#include "Drivers/I2C_Communication/Head_Card/Fan/Head_Fan.h"
#include "drivers/Motors/Motor.h"
#include "drivers/Valves/Valve.h"
#include "drivers/FPGA/FPGA_SPI_Comm.h"
#include <Drivers/I2C_Communication/I2C.h>
#include <Drivers/I2C_Communication/Head_Card/I2C_Head_Mux.h>
#include "Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.h"
#include "drivers/adc_sampling/adc.h"
#include <Drivers/I2C_Communication/WHS_Card/D_EMC2302_Fan/WHS_Fan.h>
#include <Drivers/I2C_Communication/WHS_Card/WHS_data.h>
#include <Drivers/I2C_Communication/I2C_Task.h>
#include <Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.h>
#include <Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h>
#include <Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.h>
#include <Drivers/I2C_Communication/WHS_Card/IO_Extender_Ports_TCA9555/WHS_IO.h>
#include "Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h"
#include "drivers/Uart_Comm/WHS_Controller_Comm/WHS_UART/WHS_Uart.h"
#include <Drivers/I2C_Communication/WHS_Card/IO_Extender_Ports_TCA9555/WHS_IO.h>
#include "drivers/Heater/TemperatureSensor.h"
#include "Drivers/I2C_Communication/Head_Card/PT100/ADS122X04.h"
#include "drivers/I2C_Communication/DAC/Blower.h"

#include "Modules/IFS/ifs.h"
#include "Modules/IDS/ids_ex.h"
#include "Modules/IDS/ids.h"
#include "Modules/Control/MillisecTask.h"
#include "modules/thread/thread_ex.h"
#include "modules/heaters/heaters_ex.h"
#include "modules/waste/waste_ex.h"
#include "AlarmHandling/AlarmHandling.h"

#include "StateMachines/Initialization/PowerOffSequence.h"
#include "StateMachines/Initialization/PowerIdle.h"
#include "Drivers/Uart_Comm/BTSR/BTSR.h"

extern HeadBoardTempSensConfigStruc  HeadTempSensConfig[MAX_HEAD_CARD_TEMP_SENS_ID];
extern float NumberOfRotationPerPassage;  // how many rotations per spool passage
extern void HeaterSafetyTestSetLimits(int limit);
extern uint32_t InitSequenceWHSAirFlowCalibration(void);

//#include "graphics_adapter.h"
extern uint8_t Input_Voltage;
extern uint8_t Test_Read_Buf[4];

extern uint8_t Head_Fan_PWM_Command[2];
extern uint16_t Head_Fan_Tach[2];
extern bool doorState;

bool RestartNeeded = false;
uint32_t temp1,temp2;

void Stub_ProgressRequest(MessageContainer* requestContainer)
{
    MessageContainer responseContainer;

    ProgressRequest* request = progress_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);

    //writeLine("Progress Request...");

    ProgressResponse response = PROGRESS_RESPONSE__INIT;

//    uint8_t high_byte = 0;
//    uint8_t low_byte = 0;

    uint8_t addr = 0;
    uint8_t port = 0;
    uint8_t pin  = 0;
    uint8_t value= 0;
    uint32_t enable;

    uint8_t ReadBackReg[1];

    if(request->amount == 0xFEED)//BTSR Feeder
    {
        if((request->delay) >> 4 == 0)
        {
            response.progress = BTSR_Auto_Identify(request->delay & 0xF);
        }
        else
        {
            response.progress = BTSR_Set_Parmeters(request->delay & 0xF,(request->delay & 0xFF00)>>8,(request->delay & 0xFF0000)>>16);
        }
        response.has_progress = true;
    }
    else
    if(request->amount == 0xacc1e)
    {
        response.progress = IDS_Cleaning_Move_Actuators();
        response.has_progress = true;
    }
    else
    if(request->amount == 0xacc1ea)
    {
        response.progress = HeadCard_Actuators_Relocate();
        response.has_progress = true;
    }
    else
    if(request->amount == 0xC04f)
    {

        switch(request->delay)
        {
            case 0x8400:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_5_0X84_0, ADS122X_CONFIG_0_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[14].Reg0.Byte;
                break;
            case 0x8401:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_5_0X84_0, ADS122X_CONFIG_1_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[14].Reg1.Byte;
                break;
            case 0x8402:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_5_0X84_0, ADS122X_CONFIG_2_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[14].Reg2.Byte;
                break;
            case 0x8403:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_5_0X84_0, ADS122X_CONFIG_3_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[14].Reg3.Byte;
                break;
            case 0x8600:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_7_0X86_0, ADS122X_CONFIG_0_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[15].Reg0.Byte;
                break;
            case 0x8601:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_7_0X86_0, ADS122X_CONFIG_1_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[15].Reg1.Byte;
                break;
            case 0x8602:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_7_0X86_0, ADS122X_CONFIG_2_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[15].Reg2.Byte;
                break;
            case 0x8603:
                    HeadADCPT100_ReadReg(HEAD_PT100_ZONE_7_0X86_0, ADS122X_CONFIG_3_REG, &ReadBackReg[0]);
                    response.progress = ReadBackReg[0];
                    //response.progress = HeadTempSensConfig[15].Reg3.Byte;
                break;

            default:
                    if((request->delay >= HEAD_PT100_ZONE_1_0X80_0) && (request->delay <= HEAD_PT100_RESERVE_0X8E_1))
                    {
                        response.progress = TempSensorResponse[request->delay].PT100_ADC_Reading_Bits;
                    }
                break;
        }

        response.has_progress = true;
    }
    else
    if(request->amount == 0xb05)
    {
        response.progress = Test_Uart3(request->delay);//test Shinko
        response.has_progress = true;
    }
    else
    if(request->amount == 0xdace)//test_dancer_responce_RTFU
        //in order to use it unmark the define test_RTFU_dancer !!!!!!!!!!!
    {
        test_dancer_flag = true;

        if(request->delay == 0x01)
        {
            test_dancer_direction  = true;
        }
        else
        if(request->delay == 0x00)
        {
            test_dancer_direction  = false;
        }

        response.progress = 0xdace;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xb10) //S.S Head Sensor board
        {
            if(request->delay == 0x01)
            {
                response.progress = HeadCard_ActivateHeadPressureArcBlowers();
            }
            else if(request->delay == 0x00)
            {
                response.progress = HeadCard_DeActivateHeadPressureArcBlowers();
            }
            response.has_progress = true;
        }

    else
        if(request->amount == 0x3EC)
        {
            if(request->delay == 0x01)
            {
                uint16_t Vm_mv = 0;

                Trigger_WHS_MAX11614_Read_allADC();

                get_vlev1(&Vm_mv);
                response.progress = Vm_mv;
                response.has_progress = true;
            }
        }
    else
       if(request->amount == 0x3EB) //whs valves
       {
           if (WHS_Type == WHS_TYPE_NEW)
           {
               if(request->delay == 0x0101)
               {
                   Trigger_SetWHSValveWatseCartridge(OPEN);
               }
               else
               if(request->delay == 0x0100)
               {
                   Trigger_SetWHSValveWatseCartridge(CLOSE);
               }
               else
               if(request->delay == 0x0201)
               {
                   Trigger_SetWHS_VOC_Valve(OPEN);
               }
               else
               if(request->delay == 0x0200)
               {
                   Trigger_SetWHS_VOC_Valve(CLOSE);
               }
               response.progress = 0;
               response.has_progress = false;
           }
       }
    else
       if(request->amount == 0x3EE) //whs pump
       {
           if (WHS_Type == WHS_TYPE_NEW)
           {
               if(request->delay == 0x01)
               {
                   Trigger_SetWHSPump(OPEN);
               }
               else
               if(request->delay == 0x00)
               {
                   Trigger_SetWHSPump(CLOSE);
               }
           }
           response.progress = 0;
           response.has_progress = false;
       }
    else
    if(request->amount == 0x3E9) // set TCA9555 u3 or u4
    {
        if (WHS_Type == WHS_TYPE_NEW)
        {
            if (request->delay & 0x8000)        // bit15 select the chip address
            {
                addr =  I2CExp2_ADDRESS;
            }
            else
            {
                addr =  I2CExp1_ADDRESS;
            }

            if  (request->delay & 0x4000)   // bit 14 select port 0 or 1
            {
                port = D_TCA9555_PORT_1;
            }
            else
            {
                port = D_TCA9555_PORT_0;
            }

            pin = ((request->delay & 0x0F00) >> 8);  // 8..11

            if (request->delay & 0x0001)
            {
                value = 1;
            }
            else
            {
                value = 0;
            }
            response.progress = Write_WHS_9555_io_value( addr,  port,  pin,  value);
            response.has_progress = true;
        }
    }
    else
        if(request->amount == 0x3E8) //&& (request->delay <= 0x0fff))// set WHS Blower speed 0x00-0xfff
        {
            if (WHS_Type == WHS_TYPE_NEW)
            {
                WHS_enable_control_loop( request->delay & 0x1000);//disable control loop: 0=disable 1= enable
                Trigger_SetWHSBlowerVoltage (request->delay & 0x0FFF);
                response.progress = 0;
                response.has_progress = false;
            }
        }
    else
        if (request->amount == 0x3E7) // set WHS Blower speed by Q value
        {
             if (WHS_Type == WHS_TYPE_NEW)
             {
                 WHS_Set_SetPoint_Q_value((double) request->delay);
                 response.progress = 0;
                 response.has_progress = false;
             }
        }
    else
        if (request->amount == 0x3E6) // get WHS Blower speed by Q value
        {
             if (WHS_Type == WHS_TYPE_NEW)
             {
                 response.progress = WHS_Get_Volt_Blower_Control();
                 //response.progress = 0;
                 response.has_progress = true;
             }
        }
    //   WHS_Get_Volt_Blower_Control
    else
        if(request->amount == 0x3EA)
        {
            uint16_t tempu16 = 0;
            double temp_double = 0.0;
            //uint8_t display_byte = 0;
            uint16_t A2D_data = 0;

            if (WHS_Type == WHS_TYPE_NEW)
            {
                /*display_byte = ((request->delay & 0x3000)>>12);
                switch (display_byte)
                {
                case 0:
                    //stubManager.Run<ProgressResponse>("ProgressRequest" ,0x3EA, 0x0000); //
                    SetLeftDisplayView (HeadAVERAGE);
                    SetWriteDisplayView(DrierAVERAGE);
                    SetDisplayView (AVERAGE);
                    break;
                case 1:
                    //stubManager.Run<ProgressResponse>("ProgressRequest" ,0x3EA, 0x1000); //
                    SetLeftDisplayView (HeadAVERAGE);
                    SetWriteDisplayView(HeadCURRENT);
                    break;
                case 2:
                    //stubManager.Run<ProgressResponse>("ProgressRequest" ,0x3EA, 0x2000); //
                    SetLeftDisplayView (DrierAVERAGE);
                    SetWriteDisplayView(DrierCURRENT);
                    break;
                case 3:
                    //stubManager.Run<ProgressResponse>("ProgressRequest" ,0x3EA, 0x3000); //
                    SetLeftDisplayView (HeadCURRENT);
                    SetWriteDisplayView(DrierCURRENT);
                    SetDisplayView (CURRENT);
                    break;
                }*/

                A2D_data = (request->delay & 0x0FFF);
                switch(A2D_data )// get A2D
                {
                    case 0:
                        get_orf_1(&tempu16);
                        break;
                    case 1:
                        get_orf_2(&tempu16);
                        break;
                    case 2:
                        get_orf_3(&tempu16);
                        break;
                    case 3:
                        get_vlev1(&tempu16);
                        break;
                    case 4:
                        get_vlev2(&tempu16);
                        break;
                    case 5:
                        get_gas_out(&tempu16);
                        break;
                    case 6:
                        get_cur_fan(&tempu16);
                        break;
                    case 7:
                        get_cur_vlv1(&tempu16);
                        break;
                    case 8:
                        tempu16 = 0;  //get_cur_vlv2(&tempu16);
                        break;
                    case 10:
                        temp_double = WHS_Blower_Avarege(HEAD_FLOW_METER);
                        break;
                    case 11:
                        temp_double = WHS_Blower_Avarege(NU_FLOW_METER);
                        break;
                    case 12:
                        temp_double = WHS_Blower_Avarege(DRIER_FLOW_METER);
                        break;
                    /*case 20:
                        //temp_double = get_average_Q(HEAD_FLOW_METER); //HEAD
                        break;
                    case 22:
                        //temp_double = get_average_Q(DRIER_FLOW_METER); //Drier
                        break;

                    case 11:
                        //get_orf_2(&tempu16);
                        break;
                    case 13:
                        //get_vlev1(&tempu16);
                        break;
                    case 14:
                        //get_vlev2(&tempu16);
                        break;
                    case 15:
                        //get_gas_out(&tempu16);
                        break;
                    case 16:
                        //get_cur_fan(&tempu16);
                        break;
                    case 17:
                        //get_cur_vlv1(&tempu16);
                        break;
                    case 18:
                        //tempu16 = 0;  //get_cur_vlv2(&tempu16);
                        break;*/
                    default :
                        tempu16 = 0x500;  //get_cur_vlv2(&tempu16);
                        break;
                }
           }
       if ((request->delay)<10)
       {
           response.progress = (double)tempu16;
       }
       else
       {
           response.progress = temp_double;
       }
       response.has_progress = true;
    }
    else //
    if(request->amount == 0x3ED)
    {
        uint16_t tempu16 = 0;
        if (WHS_Type == WHS_TYPE_NEW)
        {
            if (request->delay <= 0x03FF)
            {
                Trigger_WHS_Set_RDAC(request->delay);  // 0 -> 0x03FF
                get_gas_out(&tempu16);
            }
            else if (request->delay == 0x0FFF)
            {
                Trigger_WHS_set_Rheostat_to_CLEAN_AIR();

                //Search_Rheostat_Value_for_Air_clibration();
                get_gas_out(&tempu16);
            }
            else if (request->delay == 0x04FF)
                get_gas_out(&tempu16);
        }
        response.progress = (double)tempu16;
        response.has_progress = true;
    }
    else
    if((request->amount == 0xDE) && (request->delay < 8) && (request->delay >= 0)) // read dispenser type + LS status
    {
        response.progress = ((Dispenser_struct[request->delay].Type) << 8) + Dispenser_struct[request->delay].Status;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD) //undef AUTO_HOME_DISPENSERS
    {
        if ((request->delay >=AutoHoming_off )&&(request->delay<=AutoHoming_JobEnd_PowerOn_off ))
            IDS_Dispenser_SetAutoHoming_Config(request->delay);
        response.progress = 01;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD1) //Set_Check_Pressure_Bypass
    {
        REPORT_MSG((request->delay)?1:0,"Set_Check_Pressure_Bypass");
        response.progress = Set_Check_Pressure_Bypass(request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD2) //Set_Thread_Rockers_Bypass
    {
        REPORT_MSG((request->delay)?1:0,"Set_Thread_Rockers_Bypass");
        response.progress = Set_Thread_Rockers_Bypass(request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD3) //Set_Auto_Shutdown_Bypass
    {
        REPORT_MSG((request->delay)?1:0,"Set_Auto_Shutdown_Bypass");
        response.progress = Set_Auto_Shutdown_Bypass(request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD4) //Set_Auto_Idle_Bypass
    {
        REPORT_MSG((request->delay)?1:0,"Set_Auto_Idle_Bypass");
        response.progress = Set_Auto_Idle_Bypass(request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD5) //Set SecondFeederCorrection
    {
        REPORT_MSG(request->delay,"Set SecondFeederCorrection");
        SecondFeederCorrection = request->delay;
        response.progress = SecondFeederCorrection;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD6) //Set skip open lids
    {
        REPORT_MSG(request->delay,"Set SkipOpenLids");
        SkipOpenLids = request->delay;
        response.progress = SkipOpenLids;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD7) //Set actuators cleaning sequence
    {
        REPORT_MSG(request->delay,"Set actuators cleaning sequence");
        ActuatorsCleaningSequence = request->delay;
        response.progress = ActuatorsCleaningSequence;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD8) //Set ignore cone missing
    {
        REPORT_MSG(request->delay,"Set ignore cone missing");
        IgnoreConeMissing = request->delay;
        response.progress = IgnoreConeMissing;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xAD9) //halt
    {
        REPORT_MSG(request->delay,"halt");
        memset (0,0,100000);
        response.progress = IgnoreConeMissing;
        response.has_progress = true;
    }
    else
    if((request->amount == 0x01) && ((request->delay &0x010000) == 0x010000)) //change mode powerset01
    {
        response.progress = Power_Step_01_Mode(((request->delay &0x00FF00)>>8), request->delay &0x0000FF);
        response.has_progress = true;
    }
    /*else
    if((request->amount == 0xAB) && (request->delay == 0xAB)) //Get pressure with flow (orifice flow meter)
    {
        response.progress = Calculate_Pitot_Pressure(true);
        response.has_progress = true;

    }
    else
        if((request->amount == 0xAB) && (request->delay == 0x0)) //measured sensor voltage without flow (orifice flow meter)
    {
        response.progress = Calculate_Pitot_Pressure(false);
        response.has_progress = true;

    }*/
    else
    if((request->amount == 0xAC) && (request->delay == 0xAC)) //VAC
    {
            response.progress = ReadVAC();
            response.has_progress = true;

    }
    else
        if(request->amount == 0x0EAD)  //Head Card I/O
        {
            uint8_t Read_Buf[1] = {0};
            uint8_t Write_Buf[2] = {0,0};
            uint8_t Script_Slave_Add = request -> delay >> 16;//Slave address 0x40 / 0x42 / 0x44 / 0x46
            Write_Buf[0] = (request -> delay & 0x00FF00) >> 8;//read/write low/high
            /*
            ------------------
            | Byte | WR | RD |
            ------------------
            | Low  | 02 | 00 |
            | High | 03 | 01 |
            ------------------
            */
            Write_Buf[1] = request -> delay & 0x0000FF;//data to write

            response.has_progress = false;

            Select_Main_Head_Mux_Channel();

            if(Write_Buf[0] == 0)//Read
            {
                //Head_Read_IO_Reg(Script_Slave_Add, LOW);

                delayms(1);
                if(Script_Slave_Add == 0x40)
                {
                    Read_Buf[0] = Head_I2C_EXP1_0x40.uchar[0];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
                else
                if(Script_Slave_Add == 0x42)
                {
                    Read_Buf[0] = Head_I2C_EXP2_0x42.uchar[0];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
                else
                if(Script_Slave_Add == 0x44)
                {
                    Read_Buf[0] = Head_I2C_EXP3_0x44.uchar[0];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
                else
                if(Script_Slave_Add == 0x46)
                {
                    Read_Buf[0] = Head_I2C_EXP4_0x46.uchar[0];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
            }
            else

            if(Write_Buf[0] == 1)//Read
            {
                //Head_Read_IO_Reg(Script_Slave_Add, HIGH);

                delayms(1);
                if(Script_Slave_Add == 0x40)
                {
                    Read_Buf[0] = Head_I2C_EXP1_0x40.uchar[1];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
                else
                if(Script_Slave_Add == 0x42)
                {
                    Read_Buf[0] = Head_I2C_EXP2_0x42.uchar[1];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
                else
                if(Script_Slave_Add == 0x44)
                {
                    Read_Buf[0] = Head_I2C_EXP3_0x44.uchar[1];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
                else
                if(Script_Slave_Add == 0x46)//LS
                {
                    Read_Buf[0] = Head_I2C_EXP4_0x46.uchar[1];
                    response.progress = Read_Buf[0];
                    response.has_progress = true;
                }
            }
            else
            /*
            if(Write_Buf[0] == 2)//write
            {
                if(Script_Slave_Add == 0x40)
                {
                    Head_I2C_EXP1_0x40.uchar[0] = Write_Buf[1];
                }
                else
                if(Script_Slave_Add == 0x42)
                {
                    Head_I2C_EXP2_0x42.uchar[0] = Write_Buf[1];
                }
                else
                if(Script_Slave_Add == 0x46)
                {
                    Head_I2C_EXP4_0x46.uchar[0] = (Write_Buf[1] & 0x80);
                }

                //Head_Write_IO_Reg(Script_Slave_Add, LOW);
            }
            if(Write_Buf[0] == 3)//write
            {
                if(Script_Slave_Add == 0x40)
                {
                    Head_I2C_EXP1_0x40.uchar[1] = Write_Buf[1];
                }
                else
                if(Script_Slave_Add == 0x42)
                {
                    //Head_I2C_EXP2_0x42.uchar[1] = Write_Buf[1];
                    Head_I2C_EXP2_0x42.bits.OUTPUT_MAG_DIR = (Write_Buf[1] & 0x01);//control only the magnet
                }
                else
                if(Script_Slave_Add == 0x46)
                {
                    Head_I2C_EXP3_0x44.uchar[1] = (Write_Buf[1] & 0x0C);
                }
                //Head_Write_IO_Reg(Script_Slave_Add, HIGH);
            }
            */
                if(Write_Buf[0] >=0xF0) // write
                {
                    // write , Write_Buf[0] bit number 0..15 , Write_Buf[1] 0 or 1
                    Write_Buf[1] = Write_Buf[1] & 0x01;

                    Write_Buf[0] &=0x0f;

                    if(Script_Slave_Add == 0x40)
                    {
                        if(Write_Buf[1] == 0x01)
                            Head_I2C_EXP1_0x40.ushort |= (0x01 << Write_Buf[0]);
                        else if(Write_Buf[1] == 0x00)
                            Head_I2C_EXP1_0x40.ushort &= ~(0x01 << Write_Buf[0]);
                    }
                    else
                    if(Script_Slave_Add == 0x42)
                    {
                        if(Write_Buf[1] == 0x01)
                            Head_I2C_EXP2_0x42.ushort |= (0x01 << Write_Buf[0]);
                        else if(Write_Buf[1] == 0x00)
                            Head_I2C_EXP2_0x42.ushort &= ~(0x01 << Write_Buf[0]);
                    }
                    else
                    if(Script_Slave_Add == 0x46)
                    {
                        if(Write_Buf[1] == 0x01)
                            Head_I2C_EXP4_0x46.ushort |= (0x01 << Write_Buf[0]);
                        else if(Write_Buf[1] == 0x00)
                            Head_I2C_EXP4_0x46.ushort &= ~(0x01 << Write_Buf[0]);
                    }
                }
        }
        else
    if(request->amount == 0xFEAD)  //functions Head Card I/O
    {
        Select_Main_Head_Mux_Channel();

        if((request -> delay & 0xFFF000) == 0xCAF000)//Actuator
        {
            if((request -> delay & 0x00000F) >1)
            {
                if((request -> delay & 0xFFFFFF) == 0xCAF002)//ACTUATOR-IN down without delay and without stop the actuator
                {
                    Trigger_Head_Actuators_Stub(ACTIN, true, false);
                }
                else
                if((request -> delay & 0xFFFFFF) == 0xCAF003)//ACTUATOR-IN up without delay and without stop the actuator
                {
                    Trigger_Head_Actuators_Stub(ACTIN, true, true);
                }
                else
                if((request -> delay & 0xFFFFFF) == 0xCAF008)//Stop  ACTUATOR-IN
                {
                    Trigger_Head_Actuators_Stub(ACTIN, false, true);
                }
                else
                if((request -> delay & 0xFFFFFF) == 0xCAF102)//ACTUATOR-OUT  down without delay and without stop the actuator
                {
                    Trigger_Head_Actuators_Stub(ACTOT, true, false);
                }
                else
                if((request -> delay & 0xFFFFFF) == 0xCAF103)//ACTUATOR-OUT  up without delay and without stop the actuator
                {
                    Trigger_Head_Actuators_Stub(ACTOT, true, true);
                }
                else
                if((request -> delay & 0xFFFFFF) == 0xCAF108)//Stop  ACTUATOR-OUT
                {
                    Trigger_Head_Actuators_Stub(ACTOT, false, true);
                }
            }
            else
            {
               // STUB: stubManager.Run<ProgressResponse>("ProgressRequest" ,0xFEAD, 0xCAF201);//Actuators: ID, power, Direction

                //HeadCard_Actuators_Control((ACTUATORS)(((request -> delay) & 0x100)>>8), /*(bool)((request -> delay & 0x10)>>4), */(bool)((request -> delay & 0x01)));//Actuators: ID, power, Direction
                Trigger_Head_Actuators_Control((ACTUATORS)(((request -> delay) & 0xF00)>>8), (bool)((request -> delay & 0x10)>>4), (bool)((request -> delay & 0x01)));//Actuators: ID, power, Direction
                //response.progress = HeadCard_Actuators_Status((ACTUATORS)((request -> delay) & 0x100)>>8);
            }
            response.has_progress = true;
        }
        else
        if((request -> delay & 0xFF0000) == 0xCA0000)//control all heaters
        {
            if(request -> delay & 0x01)
            {
                Disconnect_Mixer_and_12_Heaters_Latch();
                HeadCard_Control_Heaters((request -> delay & 0xFF00)>>8, TRUE);
                Connect_Mixer_and_12_Heaters_Latch();
            }
            else
                HeadCard_Control_Heaters((request -> delay & 0xFF00)>>8, FALSE);
        }
        else
        if(request -> delay == 0x0)//return head type
        {
            response.progress = Head_Type;
            response.has_progress = true;
        }

    }
    else
    if((request->amount == 0xFAC0) /*&& (request->delay == 0xFAC)*/) //Head Fan control
    {
        //Head_Fan_PWM_Command[0] = (request->delay & 0xFF) ;
        //Test_Head_fan_Click();
        if(request->delay <= 0xFF)
        {
            Trigger_Head_Fan_Control(HEAD_FAN_RIGHT, request->delay & 0xFF);
            response.progress = 7864320/Head_Fan_Tach[0];
        }
        else
        {
            response.progress = 7864320/Head_Fan_Tach[0];
        }

        //response.progress = Fan_Click_Info.Product_ID;
        response.has_progress = true;

    }
    else
    if((request->amount == 0xFAC1) /*&& (request->delay == 0xFAC)*/) //Head Fan control
    {
        if(request->delay <= 0xFF)
        {
            Trigger_Head_Fan_Control(HEAD_FAN_LEFT, request->delay & 0xFF);
            response.progress = 7864320/Head_Fan_Tach[1];
        }
        else
        {
            response.progress = 7864320/Head_Fan_Tach[1];
        }
        response.has_progress = true;
    }
    else
    if ((request->amount & 0x0000FFF0) == 0xFAC0) //WHS Fan control
    {
        uint16_t fan_tacho = 0;

        if (WHS_Type == WHS_TYPE_NEW)
        {
            if(request->delay <= 0xFF)
            {
                Trigger_SetWHSFanSpeed(((request->amount & 0x0000000F)-2) , request->delay & 0x000000FF);
                fan_tacho = WHS_Fan_Tach_RPM[(request->amount & 0x0000000F)-2];
            }
            else
            {
                //reading the tacho in msectask
                fan_tacho = WHS_Fan_Tach_RPM[(request->amount & 0x0000000F)-2];//WHS_Get_fan_tach( (request->amount & 0x0000000F)-2);
            }
        }
        response.progress = fan_tacho;
        response.has_progress = true;
    }
    else
    if((request->amount == 0x0A) && ((request->delay >= 0) && (request->delay < 8))) //read the midtank calibration
    {
        response.progress = Initial_Offset_A[request->delay];
        response.has_progress = true;
    }
    else
    if((request->amount == 0xB) && ((request->delay >= 0) && (request->delay < 8)))  //read the midtank calibration
    {
        response.progress = Slope_B[request->delay];
        response.has_progress = true;
    }
    else
    if((request->amount == 0x5C4E) && (request->delay == 0x5C4E)) //Screw Home Pos dir
    {
        test_Home_Pos();
    }
    else
    if((request->amount == 0x100) && (request->delay == 0x100)) //head card PT100
    {
        Test_HeadCard_PT100(TEMP_SENSE_ANALOG_DYEINGH_TEMP1);
        //response.progress = (double)Test_Read_Buf[0];
        response.progress = (double)Data_ADC_Head;
        response.has_progress = true;
    }
    else
    if((request->amount == 0x0D) && (request->delay == 0xEE)) //Dispenser EEprom
    {
        test_disp_eeprom(0x01,0xA0);
        response.progress = OK;
        response.has_progress = true;
    }
    else
    if((request->amount == 0xCF) && (request->delay == 0xCF)) //Create File System on the Drive
    {
#ifdef WATCHDOG
        ROM_WatchdogResetDisable(WATCHDOG0_BASE);
        uint32_t timeout = 0xFFFFFFFFU;
        ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout);
#endif
        HeatersEnd();
        FRESULT iFResult = Init_Flash_File_System(true);
        if(iFResult != FR_OK)
        {
            REPORT_MSG (iFResult, "Error during init Flash File System");
            assert(iFResult);
        }
#ifdef WATCHDOG
        ROM_WatchdogResetEnable(WATCHDOG0_BASE);
        timeout = 120000000*3;
        ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout);
#endif
    }
    /*else
    if((request->amount == 0x0C) && (request->delay == 0x0C)) //Get Gas Sensor
    {
        response.progress = (double)Calculate_Gas_Power_Consumption();
        response.has_progress = true;

    }*/
    else
    if((request->amount == 0xDD) && (request->delay == 0xDD)) //Read Input Voltage
    {
        REPORT_MSG(request->delay,"CheckAcInputVoltage");
       CheckAcInputVoltage();

       response.progress = (double)Input_Voltage;
       response.has_progress = true;
    }
    else
    if((request->amount == 0x0CE) && (request->delay == 0x0CE)) //Get Gas Sensor
    {
        REPORT_MSG(request->delay,"FlashInit");
        HeatersEnd();
        FlashInit();
        response.progress = (double)OK;
        response.has_progress = true;
        RestartNeeded = true;
    }
    else
    if((request->amount == 0x0CD) && (request->delay == 0x0CD)) //Get Gas Sensor
    {
        REPORT_MSG(request->delay,"Load embedded parameters from file and restart");
        base_flashErased = false;
        LoadConfigurationParamsFromFile(true);
        REPORT_MSG(255,"Update successful, Rebooting in 5 seconds");
        Task_sleep (eOneSecond*5);
        Power_Reset();
        response.progress = (double)OK;
        response.has_progress = true;

    }
    else
    if(request->amount == 0x0CC)  //Cartridge Validation Response Demo
    {
        REPORT_MSG(request->delay,"ResponseDemo");
		ResponseDemo(request->delay);
        response.progress = (double)OK;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xE0)  //fast refresh for pressure
    {
        REPORT_MSG(request->delay,"setRapidPressureRead");
        setRapidPressureRead(request->delay);
        response.progress = (double)OK;
        response.has_progress = true;
    }
    /*else
    if(request->amount == 0xE1)  //fast refresh for pressure
    {
        REPORT_MSG(request->delay,"Starting Dispenser PID");
        IDS_Start_Pid_Testing(request->delay);
        response.progress = (double)OK;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xE2)  //fast refresh for pressure
    {
        REPORT_MSG(request->delay,"Stoping Dispenser PID");
        IDS_Stop_Pid_Testing(request->delay);
        response.progress = (double)OK;
        response.has_progress = true;
    }*/
    else
    if(request->amount == 0xE3)  //fast refresh for pressure
    {
        Report("Set WFCF Value ",__FILE__,__LINE__,request->delay,RpWarning,(int)Get_WFCF_Time(),0);
        IDS_Dispenser_SetPreSegmentWFCFValues((double) request->delay, Get_WFCF_Time());
        response.progress = (double)OK;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xE4)  //fast refresh for pressure
    {
        Report("Set WFCF build to waste Time Value ",__FILE__,__LINE__,request->delay,RpWarning,(int)Get_WFCF(),0);
        IDS_Dispenser_SetPreSegmentWFCFValues(Get_WFCF(),(double) request->delay);
        response.progress = (double)OK;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xE5)  //fast refresh for pressure
    {
        if (request->delay<=1)
        {
            Report("Set special dispensers ",__FILE__,__LINE__,request->delay,RpWarning,Special_Dispensers,0);
            Special_Dispensers = request->delay;
        }
        response.progress = (double)OK;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xE6)  //fast refresh for pressure
    {
        Report("HeaterSafetyTestSetLimits ",__FILE__,__LINE__,request->delay,RpWarning,0,0);
        HeaterSafetyTestSetLimits(request->delay);
        response.progress = (double)OK;
        response.has_progress = true;
    }

    else
    if(request->amount == 0xB1)  //fast refresh for pressure
    {
        REPORT_MSG(request->delay,"Set loading arm center");
        Read_Dryer_ENC_Position();
        Task_sleep(500);
        Read_Dryer_ENC_Position();
        Task_sleep(500);

        (double)MCU_E2PromProgram(EEPROM_STORAGE_DRYER_CENTER,Read_Dryer_ENC_Position(0,0));

        response.progress = (double)Read_Dryer_ENC_Position(0,0);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB2)  //Set loading arm cycles
    {
        REPORT_MSG(request->delay,"Set loading arm cycles");

        response.progress = (double)MCU_E2PromProgram(EEPROM_STORAGE_DRYER_CYCLES,request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB3)  //fast refresh for pressure
    {
        REPORT_MSG(request->amount,"keep alive test");
        keepalivetest = request->amount;
        response.progress = keepalivetest;
        response.has_progress = true;

    }
    else
    if(request->amount == 0xB4)  //IDS_Dispenser_Content_Init
    {
        REPORT_MSG(request->amount,"IDS_Dispenser_Content_Init");
        IDS_Dispenser_Content_Init();
        response.progress = 0;
        response.has_progress = true;

    }
    else
    if(request->amount == 0xB5)  //fast refresh for pressure
    {
        if (request->delay<=100)
        {
            REPORT_MSG(request->delay,"set stub_heating_limit");
            stub_heating_limit = request->delay;
        }
        response.progress = request->delay;
        response.has_progress = true;

    }
#ifdef VAC_TEST
    else
    if(request->amount == 0xB6)  //fast refresh for pressure
    {
        REPORT_MSG(request->delay,"set vac read test");
        VAC_Test = (double)request->delay;
        response.progress = request->delay;
        response.has_progress = true;

    }
#endif
    else
    if(request->amount == 0xB7)  //fast refresh for pressure
    {
        specialHeaterState = request->delay?true:false;
        REPORT_MSG(specialHeaterState,"set specialHeaterState");
        response.progress = specialHeaterState;
        response.has_progress = true;

    }
    else
    if(request->amount == 0xB8)  //fast refresh for pressure
        {
            if (request->delay == 1) {//init waste
                Waste_Init();
                REPORT_MSG(request->delay,"Waste_Init");
            }
            response.progress = request->delay;
            response.has_progress = true;
        }
    else
    if(request->amount == 0xB9)  //fast refresh for pressure
    {
        if ((request->delay == 0) || (request->delay == 1)) {
            doorState = request->delay;
            REPORT_MSG(request->delay,"door");
        }
        response.progress = request->delay;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB11)  //fast refresh for pressure
    {
        temp1 = Read_Dryer_ENC_Position();
        temp2 = MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulseperround*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].microstep*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulleyradius/4;

           MotorStop(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Hard_Hiz);
        MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,200);
        //6 seconds per round
        Report("Arm movement test",__FILE__,request->delay,request->delay/2*2,RpWarning,(int)request->delay%2,0);

        //SetMotHome(ThreadMotorIdToMotorId[Motor_i]);
        MotorMoveWithCallback (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, request->delay%2,request->delay/2*2,    NULL, 12000);

        response.progress = temp2;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB12)  //fast refresh for pressure
    {

        temp2 = Calculate_Arm_Distance(temp1,Read_Dryer_ENC_Position());
        Report("Arm movement test calc",__FILE__,temp2,temp1,RpWarning,Read_Dryer_ENC_Position(),0);

        response.progress = temp2;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB13)  //TryThreadLoadingRequest
    {
        TryThreadLoadingFunc(NULL);
        Report("TryThreadLoadingFunc",__FILE__,temp2,temp1,RpWarning,Read_Dryer_ENC_Position(),0);

        response.progress = 0xB13;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB14)
    {
        REPORT_MSG(request->amount,"IDS_Cleaning_Move_Actuators");
        Init_CleaningStageCounter();
        IDS_Cleaning_Move_Actuators();

        response.progress = 0xB14;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB15)
    {
        TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DH_LID;
        REPORT_MSG(request->amount,"Motor soft stop");
        MotorStop(MotorId,Soft_Stop);

        response.progress = 0xB15;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB16)
    {
        TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DH_LID;
        REPORT_MSG(request->amount,"MotorMovetoLimitSwitch");
        MotorMovetoLimitSwitch(MotorId,1 - MotorsCfg[MotorId].directionthreadwize, 50,  Motor_Id_to_LS_IdDown[MotorId], cleaningMotorCBFunction,30000);
        ReportWithPackageFilter(IDSFilter,"IDS_Cleaning_Motor_Homing", __FILE__, __LINE__, 1, RpWarning, 0, 0);

        response.progress = 0xB16;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB17)
    {
        REPORT_MSG(request->delay,"HeadBlowersOff");
        HeadBlowersOff(request->delay);

        response.progress = 0xB17;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB18)
    {
        enable = HeadBlowersOffGet();
        REPORT_MSG(enable, "HeadBlowersOffGet");

        response.progress = 0xB18;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB19)
    {
        REPORT_MSG(request->amount,"ThreadCheckArcHeadCovers");
        ThreadCheckArcHeadCovers();
        ReportWithPackageFilter(IDSFilter,"ThreadCheckArcHeadCovers", __FILE__, __LINE__, 1, RpWarning, 0, 0);

        response.progress = 0xB19;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB20)  //Set loading arm cycles
    {
        REPORT_MSG(request->delay,"Set winding calibration data");

        response.progress = (double)MCU_E2PromProgram(EEPROM_STORAGE_WINDER_CALIBRATION,request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB21)  //Set loading arm cycles
    {
        REPORT_MSG(request->delay,"Set screw max speed");

        response.progress = (double)MotorSetMaxSpeed(HARDWARE_MOTOR_TYPE__MOTO_SCREW,request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB22)  //Set loading arm cycles
    {
        REPORT_MSG(request->delay,"Send persistent alarm");
        AlarmHandlingSetAlarm (EVENT_TYPE__UNINTENDED_RESET,ON);  //handle alarm detection and operation

        response.progress = (double)MotorSetMaxSpeed(HARDWARE_MOTOR_TYPE__MOTO_SCREW,request->delay);
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB23)  //Set loading arm cycles
    {
        REPORT_MSG(request->delay,"Control dryer fan tacho");
        if (request->delay>0)
            Control_Dryer_Fan(START,request->delay);//use START or STOP,  0 - 100%();
        else
            Control_Dryer_Fan(STOP,0);//use START or STOP,  0 - 100%();
        Task_sleep(1000);

        response.progress = (double)Get_Dryer_Fan_Tacho();
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB24)  //AttemptThreadJoggingFunc
    {
        REPORT_MSG(request->delay,"AttemptThreadJoggingFunc");
        AttemptThreadJoggingFunc(NULL);
        response.progress = 0xb24;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB25)  //Change jog speed
    {
        REPORT_MSG(request->delay,"Change jog speed");
        if (request->delay<100)
            JogSpeed = request->delay;
        response.progress = JogSpeed;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xB26)  //Change sublimation time
    {
        REPORT_MSG(request->delay,"Change sublimation time");
        setSublimationBlowTime(request->delay);
        response.progress = JogSpeed;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xC3)  //suspend I2C task
    {
        if (request->delay == 0)
        {
            REPORT_MSG(request->delay,"Suspend I2C");
            PowerOffHeatersOff();
            Task_sleep(1000);
            Task_setPri (I2C_Task_Handle,-1);
        }
        else
        {
            REPORT_MSG(request->delay,"Resume");
            Task_setPri (I2C_Task_Handle,17);
        }
        response.progress = request->delay;
        response.has_progress = true;

    }
    else
    if(request->amount == 0xC11)
    {
        IgnoreMidTank = request->delay;
        REPORT_MSG(IgnoreMidTank, "IgnoreMidTank");

        response.progress = request->delay;
        response.has_progress = true;
    }
#ifdef MIDTANK_MITIGATION
    else
    if(request->amount == 0xC12)
    {
        MidTankMitigation = request->delay;
        REPORT_MSG(MidTankMitigation, "MidTankMitigation");

        response.progress = request->delay;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xC13)
    {
        MidTankMitigationOff = request->delay;
        REPORT_MSG(MidTankMitigationOff, "MidTankMitigationOff");

        response.progress = request->delay;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xC14)
    {
        MidTankMitigationOn = request->delay;
        REPORT_MSG(MidTankMitigationOn, "MidTankMitigationOn");

        response.progress = request->delay;
        response.has_progress = true;
    }
#endif
    else
    if(request->amount == 0xD11)
    {
        REPORT_MSG(request->delay, "stop/start blower control and blower");
        if (request->delay == 0)
        {
            WHS_enable_control_loop(false);
            Turn_the_Blower_On();//Turn on with the Default_Voltage
            Control_Voltage_To_Blower(1); //stop the blower
        }
        else
        {
            Turn_the_Blower_On();//Turn on with the Default_Voltage
            Control_Voltage_To_Blower(2400); //stop the blower
            WHS_enable_control_loop(true);
        }

        response.progress = request->delay;
        response.has_progress = true;
    }
    else
    if(request->amount == 0xD12)
    {
        REPORT_MSG(request->delay, "stop/start blower control and blower");
        InitSequenceWHSAirFlowCalibration();

        response.progress = request->delay;
        response.has_progress = true;
    }
    else     
	if((request->amount == 0xDF) && (request->delay == 0xDF)) //Power off
    {
        PowerOffInit();
    }
    else
    if(request->amount == 0xF1)
    {
        REPORT_MSG(request->delay,"NumberOfRotationPerPassage");
        NumberOfRotationPerPassage = (float)(request->delay)/1000;
    }
    else
    {
        response.has_progress = true;
        int i = 0;
        for (i = 0; i < request->amount; i++)
        {
            response.progress = i;
            responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, false, &response, &progress_response__pack, &progress_response__get_packed_size);
            uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer));
            size_t container_size = message_container__pack(&responseContainer, container_buffer);
            free(responseContainer.data.data);
            SendChars((char*)container_buffer, container_size);
            //free(container_buffer);


            int co = 0;
            for (co = 0; co < request->delay; co++)
            {
                __delay_cycles(1000000);
            }
        }
    }
    responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, true, &response, &progress_response__pack, &progress_response__get_packed_size);
    uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer));
    size_t container_size = message_container__pack(&responseContainer, container_buffer);
    free(responseContainer.data.data);
    if (request)
        progress_request__free_unpacked(request,NULL);
    //writeLine("Progress Completed!");
    SendChars((char*)container_buffer, container_size);
    //free(container_buffer);
    if (RestartNeeded == true)
    {
        REPORT_MSG(255,"Update successful, Rebooting in 5 seconds");
        Task_sleep (eOneSecond*5);
        Power_Reset();
        RestartNeeded = false;
    }

    return;

}